base_utils.py 415 B

12345678910111213141516171819202122232425
  1. # -*- coding: utf-8 -*-
  2. # @Time : 2023/8/14 14:49
  3. # @Author : XuJiakai
  4. # @File : base_utils
  5. # @Software: PyCharm
  6. import platform
  7. def is_windows():
  8. if platform.system() == "Windows":
  9. return True
  10. return False
  11. def get_or_none(json: dict, key: str):
  12. if not json:
  13. return None
  14. if key not in json:
  15. return None
  16. return json[key]
  17. pass
  18. if __name__ == '__main__':
  19. pass