custom-python-logger 1.0.6__tar.gz → 1.0.7__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 (18) hide show
  1. {custom_python_logger-1.0.6/custom_python_logger.egg-info → custom_python_logger-1.0.7}/PKG-INFO +2 -1
  2. custom_python_logger-1.0.7/custom_python_logger/__init__.py +3 -0
  3. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/custom_python_logger/logger.py +10 -0
  4. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7/custom_python_logger.egg-info}/PKG-INFO +2 -1
  5. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/custom_python_logger.egg-info/requires.txt +1 -0
  6. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/requirements.txt +1 -0
  7. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/setup.py +1 -1
  8. custom_python_logger-1.0.6/custom_python_logger/__init__.py +0 -3
  9. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/LICENSE +0 -0
  10. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/MANIFEST.in +0 -0
  11. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/README.md +0 -0
  12. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/custom_python_logger/usage_example.py +0 -0
  13. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/custom_python_logger.egg-info/SOURCES.txt +0 -0
  14. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/custom_python_logger.egg-info/dependency_links.txt +0 -0
  15. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/custom_python_logger.egg-info/top_level.txt +0 -0
  16. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/pyproject.toml +0 -0
  17. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/setup.cfg +0 -0
  18. {custom_python_logger-1.0.6 → custom_python_logger-1.0.7}/tests/test_logger.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: custom-python-logger
3
- Version: 1.0.6
3
+ Version: 1.0.7
4
4
  Summary: A custom logger with color support and additional features.
5
5
  Home-page: https://github.com/aviz92/custom-python-logger
6
6
  Author: Avi Zaguri
@@ -14,6 +14,7 @@ Requires-Dist: wheel
14
14
  Requires-Dist: colorlog
15
15
  Requires-Dist: pytest
16
16
  Requires-Dist: pathlib
17
+ Requires-Dist: PyYAML
17
18
  Dynamic: author
18
19
  Dynamic: description
19
20
  Dynamic: description-content-type
@@ -0,0 +1,3 @@
1
+ from custom_python_logger.logger import get_logger, json_pretty_format, yaml_pretty_format
2
+
3
+ __all__ = ["get_logger", "json_pretty_format", "yaml_pretty_format"]
@@ -6,6 +6,7 @@ import time
6
6
  from logging import LoggerAdapter, Logger
7
7
  from pathlib import Path
8
8
  from typing import Optional, Any
9
+ import yaml
9
10
  from colorlog import ColoredFormatter
10
11
 
11
12
 
@@ -154,3 +155,12 @@ def json_pretty_format(
154
155
  default: callable = None
155
156
  ) -> str:
156
157
  return json.dumps(data, indent=indent, sort_keys=sort_keys, default=default)
158
+
159
+
160
+ def yaml_pretty_format(
161
+ data: any,
162
+ indent: int = 4,
163
+ sort_keys: bool = False,
164
+ allow_unicode=True
165
+ ) -> str:
166
+ return yaml.dump(data, sort_keys=sort_keys, indent=indent, allow_unicode=allow_unicode)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: custom-python-logger
3
- Version: 1.0.6
3
+ Version: 1.0.7
4
4
  Summary: A custom logger with color support and additional features.
5
5
  Home-page: https://github.com/aviz92/custom-python-logger
6
6
  Author: Avi Zaguri
@@ -14,6 +14,7 @@ Requires-Dist: wheel
14
14
  Requires-Dist: colorlog
15
15
  Requires-Dist: pytest
16
16
  Requires-Dist: pathlib
17
+ Requires-Dist: PyYAML
17
18
  Dynamic: author
18
19
  Dynamic: description
19
20
  Dynamic: description-content-type
@@ -3,3 +3,4 @@ wheel
3
3
  colorlog
4
4
  pytest
5
5
  pathlib
6
+ PyYAML
@@ -1,6 +1,6 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
- package_version = '1.0.6'
3
+ package_version = '1.0.7'
4
4
 
5
5
  package_name = 'custom-python-logger'
6
6
  package_description = 'A custom logger with color support and additional features.'
@@ -1,3 +0,0 @@
1
- from custom_python_logger.logger import get_logger, json_pretty_format
2
-
3
- __all__ = ["get_logger", "json_pretty_format"]