ezKit 1.12.51__tar.gz → 1.12.53__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {ezkit-1.12.51/ezKit.egg-info → ezkit-1.12.53}/PKG-INFO +1 -1
  2. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/database.py +2 -2
  3. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/utils.py +13 -0
  4. {ezkit-1.12.51 → ezkit-1.12.53/ezKit.egg-info}/PKG-INFO +1 -1
  5. {ezkit-1.12.51 → ezkit-1.12.53}/setup.py +1 -1
  6. {ezkit-1.12.51 → ezkit-1.12.53}/LICENSE +0 -0
  7. {ezkit-1.12.51 → ezkit-1.12.53}/MANIFEST.in +0 -0
  8. {ezkit-1.12.51 → ezkit-1.12.53}/README.md +0 -0
  9. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/__init__.py +0 -0
  10. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/_file.py +0 -0
  11. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/auth.py +0 -0
  12. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/bottle.py +0 -0
  13. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/bottle_extensions.py +0 -0
  14. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/cipher.py +0 -0
  15. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/dockerhub.py +0 -0
  16. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/errors.py +0 -0
  17. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/fastapix.py +0 -0
  18. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/http.py +0 -0
  19. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/markdown_to_html.template +0 -0
  20. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/mongo.py +0 -0
  21. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/qywx.py +0 -0
  22. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/redis.py +0 -0
  23. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/sendemail.py +0 -0
  24. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/token.py +0 -0
  25. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/xftp.py +0 -0
  26. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit/zabbix.py +0 -0
  27. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit.egg-info/SOURCES.txt +0 -0
  28. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit.egg-info/dependency_links.txt +0 -0
  29. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit.egg-info/requires.txt +0 -0
  30. {ezkit-1.12.51 → ezkit-1.12.53}/ezKit.egg-info/top_level.txt +0 -0
  31. {ezkit-1.12.51 → ezkit-1.12.53}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ezKit
3
- Version: 1.12.51
3
+ Version: 1.12.53
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -599,7 +599,7 @@ class Database:
599
599
  try:
600
600
  # SQL文件优先
601
601
  if isinstance(read_sql_file, dict) and utils.isTrue(read_sql_file, dict):
602
- encoding = read_sql_file.pop("encoding", "utf-8")
602
+ encoding = read_sql_file.pop("encoding", "utf-8-sig")
603
603
  file_kwargs = {"mode": "r", **read_sql_file}
604
604
  with open(encoding=encoding, **file_kwargs) as f:
605
605
  sql_statement = f.read()
@@ -655,7 +655,7 @@ class Database:
655
655
  logger.success(f"{info} [success]")
656
656
 
657
657
  if isinstance(save_to_csv, dict) and utils.isTrue(save_to_csv, dict):
658
- encoding = save_to_csv.pop("encoding", "utf-8")
658
+ encoding = save_to_csv.pop("encoding", "utf-8-sig")
659
659
  csv_kwargs = {"mode": "w", **save_to_csv}
660
660
  with open(encoding=encoding, **csv_kwargs) as f:
661
661
  return self._result_save(f, result)
@@ -1368,3 +1368,16 @@ def convert_field_to_datetime(data: list[dict], field: str, fmt: str = "%Y-%m-%d
1368
1368
  except ValueError:
1369
1369
  pass
1370
1370
  return _data
1371
+
1372
+
1373
+ # --------------------------------------------------------------------------------------------------
1374
+
1375
+
1376
+ def debug_logger(message: str, *args, **kwargs):
1377
+
1378
+ try:
1379
+ # 从环境变量或配置文件中读取 DEBUG
1380
+ if os.getenv("DEBUG", "false").lower() in ("1", "true", "yes"):
1381
+ logger.debug(message, *args, **kwargs)
1382
+ except Exception as e:
1383
+ logger.exception(e)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ezKit
3
- Version: 1.12.51
3
+ Version: 1.12.53
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -4,7 +4,7 @@ from setuptools import find_packages, setup
4
4
 
5
5
  setup(
6
6
  name="ezKit",
7
- version="1.12.51",
7
+ version="1.12.53",
8
8
  author="septvean",
9
9
  author_email="septvean@gmail.com",
10
10
  description="Easy Kit",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes