python-json-logger 3.0.0__tar.gz → 3.1.0__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 (30) hide show
  1. python_json_logger-3.1.0/NOTICE +5 -0
  2. python_json_logger-3.1.0/PKG-INFO +82 -0
  3. python_json_logger-3.1.0/README.md +35 -0
  4. {python-json-logger-3.0.0 → python_json_logger-3.1.0}/pyproject.toml +27 -21
  5. python_json_logger-3.1.0/setup.cfg +4 -0
  6. python_json_logger-3.1.0/src/python_json_logger.egg-info/PKG-INFO +82 -0
  7. {python-json-logger-3.0.0 → python_json_logger-3.1.0}/src/python_json_logger.egg-info/SOURCES.txt +8 -3
  8. python_json_logger-3.1.0/src/python_json_logger.egg-info/requires.txt +26 -0
  9. python_json_logger-3.1.0/src/pythonjsonlogger/__init__.py +40 -0
  10. python_json_logger-3.1.0/src/pythonjsonlogger/core.py +363 -0
  11. python_json_logger-3.1.0/src/pythonjsonlogger/defaults.py +241 -0
  12. python_json_logger-3.1.0/src/pythonjsonlogger/json.py +119 -0
  13. python_json_logger-3.1.0/src/pythonjsonlogger/msgspec.py +59 -0
  14. python_json_logger-3.1.0/src/pythonjsonlogger/orjson.py +67 -0
  15. python_json_logger-3.1.0/tests/test_deprecation.py +28 -0
  16. python_json_logger-3.1.0/tests/test_formatters.py +599 -0
  17. python-json-logger-3.0.0/PKG-INFO +0 -223
  18. python-json-logger-3.0.0/README.md +0 -191
  19. python-json-logger-3.0.0/setup.cfg +0 -34
  20. python-json-logger-3.0.0/src/python_json_logger.egg-info/PKG-INFO +0 -223
  21. python-json-logger-3.0.0/src/python_json_logger.egg-info/requires.txt +0 -9
  22. python-json-logger-3.0.0/src/pythonjsonlogger/jsonlogger.py +0 -304
  23. python-json-logger-3.0.0/tests/__init__.py +0 -0
  24. python-json-logger-3.0.0/tests/test_jsonlogger.py +0 -309
  25. {python-json-logger-3.0.0 → python_json_logger-3.1.0}/LICENSE +0 -0
  26. {python-json-logger-3.0.0 → python_json_logger-3.1.0}/MANIFEST.in +0 -0
  27. {python-json-logger-3.0.0 → python_json_logger-3.1.0}/src/python_json_logger.egg-info/dependency_links.txt +0 -0
  28. {python-json-logger-3.0.0 → python_json_logger-3.1.0}/src/python_json_logger.egg-info/top_level.txt +0 -0
  29. {python-json-logger-3.0.0 → python_json_logger-3.1.0}/src/pythonjsonlogger/py.typed +0 -0
  30. {python-json-logger-3.0.0/src/pythonjsonlogger → python_json_logger-3.1.0/tests}/__init__.py +0 -0
@@ -0,0 +1,5 @@
1
+ This software includes the following licenced software:
2
+ - mkdocstrings-python
3
+ Copyright (c) 2021, Timothée Mazzucotelli
4
+ Licenced under ISC Licence
5
+ Source: https://github.com/mkdocstrings/python
@@ -0,0 +1,82 @@
1
+ Metadata-Version: 2.1
2
+ Name: python-json-logger
3
+ Version: 3.1.0
4
+ Summary: JSON Log Formatter for the Python Logging Package
5
+ Author-email: Zakaria Zajac <zak@madzak.com>, Nicholas Hairs <info+python-json-logger@nicholashairs.com>
6
+ Maintainer-email: Nicholas Hairs <info+python-json-logger@nicholashairs.com>
7
+ License: BSD-2-Clause License
8
+ Project-URL: Homepage, https://nhairs.github.io/python-json-logger/latest/
9
+ Project-URL: GitHub, https://github.com/nhairs/python-json-logger
10
+ Classifier: Development Status :: 6 - Mature
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: BSD License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: System :: Logging
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ License-File: NOTICE
26
+ Requires-Dist: typing_extensions
27
+ Provides-Extra: dev
28
+ Requires-Dist: orjson; (implementation_name != "pypy" and python_version < "3.13") and extra == "dev"
29
+ Requires-Dist: msgspec; (implementation_name != "pypy" and python_version < "3.13") and extra == "dev"
30
+ Requires-Dist: validate-pyproject[all]; extra == "dev"
31
+ Requires-Dist: black; extra == "dev"
32
+ Requires-Dist: pylint; extra == "dev"
33
+ Requires-Dist: mypy; extra == "dev"
34
+ Requires-Dist: pytest; extra == "dev"
35
+ Requires-Dist: freezegun; extra == "dev"
36
+ Requires-Dist: backports.zoneinfo; python_version < "3.9" and extra == "dev"
37
+ Requires-Dist: tzdata; extra == "dev"
38
+ Requires-Dist: build; extra == "dev"
39
+ Requires-Dist: mkdocs; extra == "dev"
40
+ Requires-Dist: mkdocs-material>=8.5; extra == "dev"
41
+ Requires-Dist: mkdocs-awesome-pages-plugin; extra == "dev"
42
+ Requires-Dist: mdx_truly_sane_lists; extra == "dev"
43
+ Requires-Dist: mkdocstrings[python]; extra == "dev"
44
+ Requires-Dist: mkdocs-gen-files; extra == "dev"
45
+ Requires-Dist: mkdocs-literate-nav; extra == "dev"
46
+ Requires-Dist: mike; extra == "dev"
47
+
48
+ <!-- [![PyPi](https://img.shields.io/pypi/v/python-json-logger.svg)](https://pypi.python.org/pypi/python-json-logger/)
49
+ [![PyPI - Status](https://img.shields.io/pypi/status/python-json-logger)](https://pypi.python.org/pypi/python-json-logger/)
50
+ [![Python Versions](https://img.shields.io/pypi/pyversions/python-json-logger.svg)](https://github.com/nhairs/python-json-logger) -->
51
+ [![License](https://img.shields.io/github/license/nhairs/python-json-logger.svg)](https://github.com/nhairs/python-json-logger)
52
+ ![Build Status](https://github.com/nhairs/python-json-logger/actions/workflows/test-suite.yml/badge.svg)
53
+ #
54
+ # Python JSON Logger
55
+
56
+ Python JSON Logger enables you produce JSON logs when using Python's `logging` package.
57
+
58
+ JSON logs are machine readable allowing for much easier parsing and ingestion into log aggregation tools.
59
+
60
+
61
+ ### 🚨 Important 🚨
62
+
63
+ This repository is a maintained fork of [madzak/python-json-logger](https://github.com/madzak/python-json-logger) pending [a PEP 541 request](https://github.com/pypi/support/issues/3607) for the PyPI package. The future direction of the project is being discussed [here](https://github.com/nhairs/python-json-logger/issues/1).
64
+
65
+ ## Documentation
66
+
67
+ - [Documentation](https://nhairs.github.io/python-json-logger/latest/)
68
+ - [Quickstart Guide](https://nhairs.github.io/python-json-logger/latest/quickstart/)
69
+ - [Change Log](https://nhairs.github.io/python-json-logger/latest/changelog/)
70
+ - [Contributing](https://nhairs.github.io/python-json-logger/latest/contributing/)
71
+
72
+ ## License
73
+
74
+ This project is licensed under the BSD 2 Clause License - see [`LICENSE`](https://github.com/nhairs/python-json-logger/blob/main/LICENSE)
75
+
76
+ ## Authors and Maintainers
77
+
78
+ This project was originally authored by [Zakaria Zajac](https://github.com/madzak) and our wonderful [contributors](https://github.com/nhairs/python-json-logger/graphs/contributors)
79
+
80
+ It is currently maintained by:
81
+
82
+ - [Nicholas Hairs](https://github.com/nhairs) - [nicholashairs.com](https://www.nicholashairs.com)
@@ -0,0 +1,35 @@
1
+ <!-- [![PyPi](https://img.shields.io/pypi/v/python-json-logger.svg)](https://pypi.python.org/pypi/python-json-logger/)
2
+ [![PyPI - Status](https://img.shields.io/pypi/status/python-json-logger)](https://pypi.python.org/pypi/python-json-logger/)
3
+ [![Python Versions](https://img.shields.io/pypi/pyversions/python-json-logger.svg)](https://github.com/nhairs/python-json-logger) -->
4
+ [![License](https://img.shields.io/github/license/nhairs/python-json-logger.svg)](https://github.com/nhairs/python-json-logger)
5
+ ![Build Status](https://github.com/nhairs/python-json-logger/actions/workflows/test-suite.yml/badge.svg)
6
+ #
7
+ # Python JSON Logger
8
+
9
+ Python JSON Logger enables you produce JSON logs when using Python's `logging` package.
10
+
11
+ JSON logs are machine readable allowing for much easier parsing and ingestion into log aggregation tools.
12
+
13
+
14
+ ### 🚨 Important 🚨
15
+
16
+ This repository is a maintained fork of [madzak/python-json-logger](https://github.com/madzak/python-json-logger) pending [a PEP 541 request](https://github.com/pypi/support/issues/3607) for the PyPI package. The future direction of the project is being discussed [here](https://github.com/nhairs/python-json-logger/issues/1).
17
+
18
+ ## Documentation
19
+
20
+ - [Documentation](https://nhairs.github.io/python-json-logger/latest/)
21
+ - [Quickstart Guide](https://nhairs.github.io/python-json-logger/latest/quickstart/)
22
+ - [Change Log](https://nhairs.github.io/python-json-logger/latest/changelog/)
23
+ - [Contributing](https://nhairs.github.io/python-json-logger/latest/contributing/)
24
+
25
+ ## License
26
+
27
+ This project is licensed under the BSD 2 Clause License - see [`LICENSE`](https://github.com/nhairs/python-json-logger/blob/main/LICENSE)
28
+
29
+ ## Authors and Maintainers
30
+
31
+ This project was originally authored by [Zakaria Zajac](https://github.com/madzak) and our wonderful [contributors](https://github.com/nhairs/python-json-logger/graphs/contributors)
32
+
33
+ It is currently maintained by:
34
+
35
+ - [Nicholas Hairs](https://github.com/nhairs) - [nicholashairs.com](https://www.nicholashairs.com)
@@ -4,18 +4,21 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-json-logger"
7
- version = "3.0.0"
7
+ version = "3.1.0"
8
8
  description = "JSON Log Formatter for the Python Logging Package"
9
9
  authors = [
10
10
  {name = "Zakaria Zajac", email = "zak@madzak.com"},
11
+ {name = "Nicholas Hairs", email = "info+python-json-logger@nicholashairs.com"},
11
12
  ]
12
13
  maintainers = [
13
14
  {name = "Nicholas Hairs", email = "info+python-json-logger@nicholashairs.com"},
14
15
  ]
15
16
 
16
17
  # Dependency Information
17
- requires-python = ">=3.7"
18
- # dependencies = []
18
+ requires-python = ">=3.8"
19
+ dependencies = [
20
+ "typing_extensions",
21
+ ]
19
22
 
20
23
  # Extra information
21
24
  readme = "README.md"
@@ -26,7 +29,6 @@ classifiers = [
26
29
  "License :: OSI Approved :: BSD License",
27
30
  "Operating System :: OS Independent",
28
31
  "Programming Language :: Python :: 3 :: Only",
29
- "Programming Language :: Python :: 3.7",
30
32
  "Programming Language :: Python :: 3.8",
31
33
  "Programming Language :: Python :: 3.9",
32
34
  "Programming Language :: Python :: 3.10",
@@ -37,33 +39,37 @@ classifiers = [
37
39
  ]
38
40
 
39
41
  [project.urls]
40
- # homepage = "https://nhairs.github.io/python-json-logger/latest/"
42
+ Homepage = "https://nhairs.github.io/python-json-logger/latest/"
41
43
  GitHub = "https://github.com/nhairs/python-json-logger"
42
44
 
43
45
  [project.optional-dependencies]
44
- lint = [
46
+ dev = [
47
+ ## Optional but required for dev
48
+ "orjson;implementation_name!='pypy' and python_version<'3.13'",
49
+ "msgspec;implementation_name!='pypy' and python_version<'3.13'",
50
+ ## Lint
45
51
  "validate-pyproject[all]",
46
52
  "black",
47
53
  "pylint",
48
54
  "mypy",
49
- ]
50
-
51
- test = [
55
+ ## Test
52
56
  "pytest",
57
+ "freezegun",
58
+ "backports.zoneinfo;python_version<'3.9'",
59
+ "tzdata",
60
+ ## Build
61
+ "build",
62
+ ## Docs
63
+ "mkdocs",
64
+ "mkdocs-material>=8.5",
65
+ "mkdocs-awesome-pages-plugin",
66
+ "mdx_truly_sane_lists",
67
+ "mkdocstrings[python]",
68
+ "mkdocs-gen-files",
69
+ "mkdocs-literate-nav",
70
+ "mike",
53
71
  ]
54
72
 
55
- #docs = [
56
- # "black",
57
- # "mkdocs",
58
- # "mkdocs-material>=8.5",
59
- # "mkdocs-awesome-pages-plugin",
60
- # "mdx_truly_sane_lists",
61
- # "mkdocstrings[python]",
62
- # "mkdocs-gen-files",
63
- # "mkdocs-literate-nav",
64
- # "mike",
65
- #]
66
-
67
73
  [tool.setuptools.packages.find]
68
74
  where = ["src"]
69
75
  include = ["pythonjsonlogger*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,82 @@
1
+ Metadata-Version: 2.1
2
+ Name: python-json-logger
3
+ Version: 3.1.0
4
+ Summary: JSON Log Formatter for the Python Logging Package
5
+ Author-email: Zakaria Zajac <zak@madzak.com>, Nicholas Hairs <info+python-json-logger@nicholashairs.com>
6
+ Maintainer-email: Nicholas Hairs <info+python-json-logger@nicholashairs.com>
7
+ License: BSD-2-Clause License
8
+ Project-URL: Homepage, https://nhairs.github.io/python-json-logger/latest/
9
+ Project-URL: GitHub, https://github.com/nhairs/python-json-logger
10
+ Classifier: Development Status :: 6 - Mature
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: BSD License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: System :: Logging
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ License-File: NOTICE
26
+ Requires-Dist: typing_extensions
27
+ Provides-Extra: dev
28
+ Requires-Dist: orjson; (implementation_name != "pypy" and python_version < "3.13") and extra == "dev"
29
+ Requires-Dist: msgspec; (implementation_name != "pypy" and python_version < "3.13") and extra == "dev"
30
+ Requires-Dist: validate-pyproject[all]; extra == "dev"
31
+ Requires-Dist: black; extra == "dev"
32
+ Requires-Dist: pylint; extra == "dev"
33
+ Requires-Dist: mypy; extra == "dev"
34
+ Requires-Dist: pytest; extra == "dev"
35
+ Requires-Dist: freezegun; extra == "dev"
36
+ Requires-Dist: backports.zoneinfo; python_version < "3.9" and extra == "dev"
37
+ Requires-Dist: tzdata; extra == "dev"
38
+ Requires-Dist: build; extra == "dev"
39
+ Requires-Dist: mkdocs; extra == "dev"
40
+ Requires-Dist: mkdocs-material>=8.5; extra == "dev"
41
+ Requires-Dist: mkdocs-awesome-pages-plugin; extra == "dev"
42
+ Requires-Dist: mdx_truly_sane_lists; extra == "dev"
43
+ Requires-Dist: mkdocstrings[python]; extra == "dev"
44
+ Requires-Dist: mkdocs-gen-files; extra == "dev"
45
+ Requires-Dist: mkdocs-literate-nav; extra == "dev"
46
+ Requires-Dist: mike; extra == "dev"
47
+
48
+ <!-- [![PyPi](https://img.shields.io/pypi/v/python-json-logger.svg)](https://pypi.python.org/pypi/python-json-logger/)
49
+ [![PyPI - Status](https://img.shields.io/pypi/status/python-json-logger)](https://pypi.python.org/pypi/python-json-logger/)
50
+ [![Python Versions](https://img.shields.io/pypi/pyversions/python-json-logger.svg)](https://github.com/nhairs/python-json-logger) -->
51
+ [![License](https://img.shields.io/github/license/nhairs/python-json-logger.svg)](https://github.com/nhairs/python-json-logger)
52
+ ![Build Status](https://github.com/nhairs/python-json-logger/actions/workflows/test-suite.yml/badge.svg)
53
+ #
54
+ # Python JSON Logger
55
+
56
+ Python JSON Logger enables you produce JSON logs when using Python's `logging` package.
57
+
58
+ JSON logs are machine readable allowing for much easier parsing and ingestion into log aggregation tools.
59
+
60
+
61
+ ### 🚨 Important 🚨
62
+
63
+ This repository is a maintained fork of [madzak/python-json-logger](https://github.com/madzak/python-json-logger) pending [a PEP 541 request](https://github.com/pypi/support/issues/3607) for the PyPI package. The future direction of the project is being discussed [here](https://github.com/nhairs/python-json-logger/issues/1).
64
+
65
+ ## Documentation
66
+
67
+ - [Documentation](https://nhairs.github.io/python-json-logger/latest/)
68
+ - [Quickstart Guide](https://nhairs.github.io/python-json-logger/latest/quickstart/)
69
+ - [Change Log](https://nhairs.github.io/python-json-logger/latest/changelog/)
70
+ - [Contributing](https://nhairs.github.io/python-json-logger/latest/contributing/)
71
+
72
+ ## License
73
+
74
+ This project is licensed under the BSD 2 Clause License - see [`LICENSE`](https://github.com/nhairs/python-json-logger/blob/main/LICENSE)
75
+
76
+ ## Authors and Maintainers
77
+
78
+ This project was originally authored by [Zakaria Zajac](https://github.com/madzak) and our wonderful [contributors](https://github.com/nhairs/python-json-logger/graphs/contributors)
79
+
80
+ It is currently maintained by:
81
+
82
+ - [Nicholas Hairs](https://github.com/nhairs) - [nicholashairs.com](https://www.nicholashairs.com)
@@ -1,15 +1,20 @@
1
1
  LICENSE
2
2
  MANIFEST.in
3
+ NOTICE
3
4
  README.md
4
5
  pyproject.toml
5
- setup.cfg
6
6
  src/python_json_logger.egg-info/PKG-INFO
7
7
  src/python_json_logger.egg-info/SOURCES.txt
8
8
  src/python_json_logger.egg-info/dependency_links.txt
9
9
  src/python_json_logger.egg-info/requires.txt
10
10
  src/python_json_logger.egg-info/top_level.txt
11
11
  src/pythonjsonlogger/__init__.py
12
- src/pythonjsonlogger/jsonlogger.py
12
+ src/pythonjsonlogger/core.py
13
+ src/pythonjsonlogger/defaults.py
14
+ src/pythonjsonlogger/json.py
15
+ src/pythonjsonlogger/msgspec.py
16
+ src/pythonjsonlogger/orjson.py
13
17
  src/pythonjsonlogger/py.typed
14
18
  tests/__init__.py
15
- tests/test_jsonlogger.py
19
+ tests/test_deprecation.py
20
+ tests/test_formatters.py
@@ -0,0 +1,26 @@
1
+ typing_extensions
2
+
3
+ [dev]
4
+ validate-pyproject[all]
5
+ black
6
+ pylint
7
+ mypy
8
+ pytest
9
+ freezegun
10
+ tzdata
11
+ build
12
+ mkdocs
13
+ mkdocs-material>=8.5
14
+ mkdocs-awesome-pages-plugin
15
+ mdx_truly_sane_lists
16
+ mkdocstrings[python]
17
+ mkdocs-gen-files
18
+ mkdocs-literate-nav
19
+ mike
20
+
21
+ [dev:implementation_name != "pypy" and python_version < "3.13"]
22
+ orjson
23
+ msgspec
24
+
25
+ [dev:python_version < "3.9"]
26
+ backports.zoneinfo
@@ -0,0 +1,40 @@
1
+ ### IMPORTS
2
+ ### ============================================================================
3
+ ## Future
4
+
5
+ ## Standard Library
6
+ import warnings
7
+
8
+ ## Installed
9
+
10
+ ## Application
11
+ import pythonjsonlogger.json
12
+
13
+ ### CONSTANTS
14
+ ### ============================================================================
15
+ try:
16
+ import orjson
17
+
18
+ ORJSON_AVAILABLE = True
19
+ except ImportError:
20
+ ORJSON_AVAILABLE = False
21
+
22
+
23
+ try:
24
+ import msgspec
25
+
26
+ MSGSPEC_AVAILABLE = True
27
+ except ImportError:
28
+ MSGSPEC_AVAILABLE = False
29
+
30
+
31
+ ### DEPRECATED COMPATIBILITY
32
+ ### ============================================================================
33
+ def __getattr__(name: str):
34
+ if name == "jsonlogger":
35
+ warnings.warn(
36
+ "pythonjsonlogger.jsonlogger has been moved to pythonjsonlogger.json",
37
+ DeprecationWarning,
38
+ )
39
+ return pythonjsonlogger.json
40
+ raise AttributeError(f"module {__name__} has no attribute {name}")