forked from hynek/structlog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
227 lines (183 loc) · 7.21 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# SPDX-License-Identifier: MIT OR Apache-2.0
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "structlog"
authors = [{name = "Hynek Schlawack", email = "[email protected]"}]
dynamic = ["version", "description"]
requires-python = ">=3.7"
dependencies = ["typing-extensions; python_version<'3.8'"]
license = { file = "LICENSE" }
keywords = ["logging", "structured", "structure", "log"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Logging",
]
[project.urls]
Changelog = "https://www.structlog.org/en/stable/changelog.html"
Documentation = "https://www.structlog.org/"
"Bug Tracker" = "https://github.com/hynek/structlog/issues"
"Source Code" = "https://github.com/hynek/structlog"
Funding = "https://github.com/sponsors/hynek"
Tidelift = "https://tidelift.com/subscription/pkg/pypi-structlog?utm_source=pypi-structlog&utm_medium=pypi"
Ko-fi = "https://ko-fi.com/the_hynek"
[tool.flit.sdist]
include = [
".pre-commit-config.yaml",
".readthedocs.yml",
"*.ini",
"*.rst",
"LICENSE.*",
"docs",
"tests",
".github",
"show_off.py",
]
exclude = [
"docs/_build",
"tests/__pycache__",
"tests/.mypy_cache",
]
[project.optional-dependencies]
tests = [
"coverage[toml]",
"freezegun>=0.2.8",
"pretend",
"pytest-asyncio>=0.17",
"pytest>=6.0",
"simplejson",
]
docs = [
"furo",
"sphinx",
"sphinx-notfound-page",
"sphinxcontrib-mermaid",
"twisted",
]
# Combine tests and docs and a few more dev tools to a dev environment.
# Refresh using `tox -e cog`
dev = [
"pre-commit",
"rich",
"cogapp",
"tomli",
# [[[cog
# import pathlib, tomli
# cfg = tomli.loads(pathlib.Path("pyproject.toml").read_text())
# opt = cfg["project"]["optional-dependencies"]
# for dep in opt["tests"] + opt["docs"]:
# print(f'"{dep}",')
# ]]]
"coverage[toml]",
"freezegun>=0.2.8",
"pretend",
"pytest-asyncio>=0.17",
"pytest>=6.0",
"simplejson",
"furo",
"sphinx",
"sphinx-notfound-page",
"sphinxcontrib-mermaid",
"twisted",
# [[[end]]]
]
[tool.pytest.ini_options]
addopts = "-ra --strict-markers"
xfail_strict = true
testpaths = "tests"
filterwarnings = [
"once::Warning",
]
asyncio_mode = "strict"
[tool.coverage.run]
parallel = true
branch = true
source = ["structlog"]
[tool.coverage.paths]
source = ["src", ".tox/*/site-packages"]
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
# a more strict default pragma
"\\# pragma: no cover\\b",
# allow defensive code
"^\\s*raise AssertionError\\b",
"^\\s*raise NotImplementedError\\b",
"^\\s*return NotImplemented\\b",
"^\\s*raise$",
# typing-related code
"^if (False|TYPE_CHECKING):",
": \\.\\.\\.(\\s*#.*)?$",
"^ +\\.\\.\\.$",
"-> ['\"]?NoReturn['\"]?:",
]
[tool.black]
line-length = 79
[tool.isort]
profile = "attrs"
[project.readme]
content-type = "text/x-rst"
# Load README.rst, but remove header and badges.
# Refresh using `tox -e cog`
# Nothing except for the adapted README follows after this point.
# [[[cog
# import pathlib
# print(
# 'text = """'
# ".. image:: https://www.structlog.org/en/stable/_static/structlog_logo_small_transparent.png\n"
# " :alt: structlog mascot\n"
# " :align: center\n\n"
# + pathlib.Path("README.rst")
# .read_text()
# .split(".. -begin-short-")[1]
# .lstrip()
# .replace('"""', r'\"\"\"')
# + '"""',
# end=""
# )
# ]]]
text = """.. image:: https://www.structlog.org/en/stable/_static/structlog_logo_small_transparent.png
:alt: structlog mascot
:align: center
``structlog`` makes logging in Python **faster**, **less painful**, and **more powerful** by adding **structure** to your log entries.
It has been successfully used in production at every scale since **2013**, while embracing cutting-edge technologies like *asyncio* or type hints along the way, and `influenced the design <https://twitter.com/sirupsen/status/638330548361019392>`_ of `structured logging packages in other ecosystems <https://github.com/sirupsen/logrus>`_.
Thanks to its highly flexible design, it's up to you whether you want ``structlog`` to take care about the **output** of your log entries or whether you prefer to **forward** them to an existing logging system like the standard library's ``logging`` module.
.. image:: https://github.com/hynek/structlog/blob/main/docs/_static/console_renderer.png?raw=true
.. -end-short-
A short explanation on *why* structured logging is good for you, and why ``structlog`` is the right tool for the job can be found in the `Why chapter <https://www.structlog.org/en/stable/why.html>`_ of our documentation.
Once you feel inspired to try it out, check out our friendly `Getting Started tutorial <https://www.structlog.org/en/stable/getting-started.html>`_ that also contains detailed installation instructions!
If you prefer videos over reading, check out `Markus Holtermann <https://twitter.com/m_holtermann>`_'s DjangoCon Europe 2019 talk: `Logging Rethought 2: The Actions of Frank Taylor Jr. <https://www.youtube.com/watch?v=Y5eyEgyHLLo>`_
.. -begin-meta-
Getting Help
============
Please use the ``structlog`` tag on `StackOverflow <https://stackoverflow.com/questions/tagged/structlog>`_ to get help.
Answering questions of your fellow developers is also a great way to help the project!
Project Information
===================
``structlog`` is dual-licensed under `Apache License, version 2 <https://choosealicense.com/licenses/apache/>`_ and `MIT <https://choosealicense.com/licenses/mit/>`_, available from `PyPI <https://pypi.org/project/structlog/>`_, the source code can be found on `GitHub <https://github.com/hynek/structlog>`_, the documentation at https://www.structlog.org/.
We collect useful third-party extension in `our wiki <https://github.com/hynek/structlog/wiki/Third-party-Extensions>`_.
``structlog`` targets Python 3.7 and later.
PyPy3 is known to work, but is not tested anymore.
``structlog`` for Enterprise
----------------------------
Available as part of the Tidelift Subscription.
The maintainers of structlog and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.
`Learn more. <https://tidelift.com/subscription/pkg/pypi-structlog?utm_source=pypi-structlog&utm_medium=referral&utm_campaign=readme>`_
"""
# [[[end]]]