@formaggio-software/rhtop-linux-amd64 0.0.0-stage → 0.0.6
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.
- package/package.json +16 -4
- package/payload/LICENSE.txt +95 -0
- package/payload/NOTICE +14 -0
- package/payload/THIRD_PARTY_NOTICES/altgraph-0.17.5.dist-info/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/altgraph-0.17.5.dist-info/METADATA +307 -0
- package/payload/THIRD_PARTY_NOTICES/annotated_types-0.8.0.dist-info/METADATA +295 -0
- package/payload/THIRD_PARTY_NOTICES/annotated_types-0.8.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/anyio-4.16.0.dist-info/METADATA +108 -0
- package/payload/THIRD_PARTY_NOTICES/anyio-4.16.0.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/attrs-26.1.0.dist-info/METADATA +199 -0
- package/payload/THIRD_PARTY_NOTICES/attrs-26.1.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/build-1.6.1.dist-info/METADATA +142 -0
- package/payload/THIRD_PARTY_NOTICES/build-1.6.1.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/cffi-2.1.1.dist-info/METADATA +67 -0
- package/payload/THIRD_PARTY_NOTICES/cffi-2.1.1.dist-info/licenses/LICENSE +23 -0
- package/payload/THIRD_PARTY_NOTICES/click-8.5.1.dist-info/METADATA +83 -0
- package/payload/THIRD_PARTY_NOTICES/click-8.5.1.dist-info/licenses/LICENSE.txt +28 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/METADATA +111 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/licenses/LICENSE +3 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/licenses/LICENSE.APACHE +202 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/licenses/LICENSE.BSD +27 -0
- package/payload/THIRD_PARTY_NOTICES/h11-0.16.0.dist-info/METADATA +202 -0
- package/payload/THIRD_PARTY_NOTICES/h11-0.16.0.dist-info/licenses/LICENSE.txt +22 -0
- package/payload/THIRD_PARTY_NOTICES/hatchling-1.33.0.dist-info/METADATA +81 -0
- package/payload/THIRD_PARTY_NOTICES/hatchling-1.33.0.dist-info/licenses/LICENSE.txt +9 -0
- package/payload/THIRD_PARTY_NOTICES/httpcore2-2.16.2.dist-info/METADATA +798 -0
- package/payload/THIRD_PARTY_NOTICES/httpcore2-2.16.2.dist-info/licenses/LICENSE.md +28 -0
- package/payload/THIRD_PARTY_NOTICES/httpx2-2.16.2.dist-info/METADATA +227 -0
- package/payload/THIRD_PARTY_NOTICES/httpx2-2.16.2.dist-info/licenses/LICENSE.md +13 -0
- package/payload/THIRD_PARTY_NOTICES/idna-3.20.dist-info/METADATA +176 -0
- package/payload/THIRD_PARTY_NOTICES/idna-3.20.dist-info/licenses/LICENSE.md +31 -0
- package/payload/THIRD_PARTY_NOTICES/iniconfig-2.3.1.dist-info/METADATA +84 -0
- package/payload/THIRD_PARTY_NOTICES/iniconfig-2.3.1.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco.classes-3.4.0.dist-info/LICENSE +17 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco.classes-3.4.0.dist-info/METADATA +60 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_context-6.1.2.dist-info/METADATA +81 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_context-6.1.2.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_functools-4.6.0.dist-info/METADATA +68 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_functools-4.6.0.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/jeepney-0.9.0.dist-info/METADATA +35 -0
- package/payload/THIRD_PARTY_NOTICES/jeepney-0.9.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema-4.26.0.dist-info/METADATA +170 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema-4.26.0.dist-info/licenses/COPYING +19 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema_specifications-2025.9.1.dist-info/METADATA +54 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema_specifications-2025.9.1.dist-info/licenses/COPYING +19 -0
- package/payload/THIRD_PARTY_NOTICES/keyring-25.7.0.dist-info/METADATA +554 -0
- package/payload/THIRD_PARTY_NOTICES/keyring-25.7.0.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/linkify_it_py-2.2.0.dist-info/METADATA +262 -0
- package/payload/THIRD_PARTY_NOTICES/linkify_it_py-2.2.0.dist-info/licenses/LICENSE +48 -0
- package/payload/THIRD_PARTY_NOTICES/markdown_it_py-4.3.0.dist-info/METADATA +237 -0
- package/payload/THIRD_PARTY_NOTICES/markdown_it_py-4.3.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/markdown_it_py-4.3.0.dist-info/licenses/LICENSE.markdown-it +22 -0
- package/payload/THIRD_PARTY_NOTICES/mcp-2.3.0.dist-info/METADATA +172 -0
- package/payload/THIRD_PARTY_NOTICES/mcp-2.3.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/mcp_types-2.3.0.dist-info/METADATA +43 -0
- package/payload/THIRD_PARTY_NOTICES/mcp_types-2.3.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/mdit_py_plugins-0.7.0.dist-info/METADATA +60 -0
- package/payload/THIRD_PARTY_NOTICES/mdit_py_plugins-0.7.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/mdurl-0.1.2.dist-info/LICENSE +46 -0
- package/payload/THIRD_PARTY_NOTICES/mdurl-0.1.2.dist-info/METADATA +32 -0
- package/payload/THIRD_PARTY_NOTICES/more_itertools-11.2.1.dist-info/METADATA +302 -0
- package/payload/THIRD_PARTY_NOTICES/more_itertools-11.2.1.dist-info/licenses/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/opentelemetry_api-1.45.2.dist-info/METADATA +43 -0
- package/payload/THIRD_PARTY_NOTICES/opentelemetry_api-1.45.2.dist-info/licenses/LICENSE +201 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/METADATA +112 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/licenses/LICENSE +3 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/licenses/LICENSE.APACHE +177 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/licenses/LICENSE.BSD +23 -0
- package/payload/THIRD_PARTY_NOTICES/pathspec-1.1.1.dist-info/METADATA +392 -0
- package/payload/THIRD_PARTY_NOTICES/pathspec-1.1.1.dist-info/licenses/LICENSE +373 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/METADATA +110 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/AUTHORS.txt +888 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/LICENSE.txt +20 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +13 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/certifi/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/distlib/LICENSE.txt +284 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/distro/LICENSE +202 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/idna/LICENSE.md +31 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/msgpack/COPYING +14 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE +3 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +177 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.BSD +23 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE +17 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/pygments/LICENSE +25 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/requests/LICENSE +175 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE +13 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/rich/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/tomli/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/truststore/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pip-26.2.2.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt +21 -0
- package/payload/THIRD_PARTY_NOTICES/platformdirs-4.14.7.dist-info/METADATA +114 -0
- package/payload/THIRD_PARTY_NOTICES/platformdirs-4.14.7.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pluggy-1.7.0.dist-info/METADATA +152 -0
- package/payload/THIRD_PARTY_NOTICES/pluggy-1.7.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pycparser-3.12.dist-info/METADATA +286 -0
- package/payload/THIRD_PARTY_NOTICES/pycparser-3.12.dist-info/licenses/LICENSE +27 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic-2.14.3.dist-info/METADATA +1646 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic-2.14.3.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic_core-2.50.4.dist-info/METADATA +172 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic_core-2.50.4.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pygments-2.21.0.dist-info/METADATA +58 -0
- package/payload/THIRD_PARTY_NOTICES/pygments-2.21.0.dist-info/licenses/AUTHORS +296 -0
- package/payload/THIRD_PARTY_NOTICES/pygments-2.21.0.dist-info/licenses/LICENSE +25 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller-6.22.3.dist-info/METADATA +213 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller-6.22.3.dist-info/licenses/COPYING.txt +648 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller_hooks_contrib-2026.10.dist-info/METADATA +373 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller_hooks_contrib-2026.10.dist-info/licenses/LICENSE +521 -0
- package/payload/THIRD_PARTY_NOTICES/pyjwt-2.15.1.dist-info/METADATA +94 -0
- package/payload/THIRD_PARTY_NOTICES/pyjwt-2.15.1.dist-info/licenses/AUTHORS.rst +7 -0
- package/payload/THIRD_PARTY_NOTICES/pyjwt-2.15.1.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pyproject_hooks-1.3.3.dist-info/METADATA +27 -0
- package/payload/THIRD_PARTY_NOTICES/pyproject_hooks-1.3.3.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pytest-9.2.0.dist-info/METADATA +217 -0
- package/payload/THIRD_PARTY_NOTICES/pytest-9.2.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pytest_asyncio-1.5.0.dist-info/METADATA +100 -0
- package/payload/THIRD_PARTY_NOTICES/pytest_asyncio-1.5.0.dist-info/licenses/LICENSE +201 -0
- package/payload/THIRD_PARTY_NOTICES/python_multipart-0.0.34.dist-info/METADATA +179 -0
- package/payload/THIRD_PARTY_NOTICES/python_multipart-0.0.34.dist-info/licenses/LICENSE.txt +202 -0
- package/payload/THIRD_PARTY_NOTICES/pyyaml-6.0.3.dist-info/METADATA +59 -0
- package/payload/THIRD_PARTY_NOTICES/pyyaml-6.0.3.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/referencing-0.37.0.dist-info/METADATA +64 -0
- package/payload/THIRD_PARTY_NOTICES/referencing-0.37.0.dist-info/licenses/COPYING +19 -0
- package/payload/THIRD_PARTY_NOTICES/rich-15.0.0.dist-info/METADATA +479 -0
- package/payload/THIRD_PARTY_NOTICES/rich-15.0.0.dist-info/licenses/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/rpds_py-2026.9.1.dist-info/METADATA +99 -0
- package/payload/THIRD_PARTY_NOTICES/rpds_py-2026.9.1.dist-info/licenses/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/ruff-0.17.5.dist-info/METADATA +484 -0
- package/payload/THIRD_PARTY_NOTICES/ruff-0.17.5.dist-info/licenses/LICENSE +430 -0
- package/payload/THIRD_PARTY_NOTICES/secretstorage-3.5.0.dist-info/METADATA +109 -0
- package/payload/THIRD_PARTY_NOTICES/secretstorage-3.5.0.dist-info/licenses/LICENSE +25 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/autocommand-2.2.2.dist-info/LICENSE +166 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/autocommand-2.2.2.dist-info/METADATA +420 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/LICENSE +17 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/METADATA +46 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA +133 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/licenses/LICENSE +73 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/jaraco.text-4.0.0.dist-info/LICENSE +17 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/jaraco.text-4.0.0.dist-info/METADATA +96 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/jaraco_context-6.1.0.dist-info/METADATA +82 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/jaraco_context-6.1.0.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/METADATA +69 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/more_itertools-10.8.0.dist-info/METADATA +283 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/more_itertools-10.8.0.dist-info/licenses/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/packaging-26.3.dist-info/METADATA +112 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/packaging-26.3.dist-info/licenses/LICENSE +3 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/packaging-26.3.dist-info/licenses/LICENSE.APACHE +177 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/packaging-26.3.dist-info/licenses/LICENSE.BSD +23 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/platformdirs-4.4.0.dist-info/METADATA +350 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/platformdirs-4.4.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/tomli-2.4.0.dist-info/METADATA +270 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/tomli-2.4.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/wheel-0.46.3.dist-info/METADATA +69 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/wheel-0.46.3.dist-info/licenses/LICENSE.txt +21 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/zipp-3.23.0.dist-info/METADATA +106 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/zipp-3.23.0.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools-84.2.1.dist-info/METADATA +140 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools-84.2.1.dist-info/licenses/LICENSE +17 -0
- package/payload/THIRD_PARTY_NOTICES/sse_starlette-3.7.0.dist-info/METADATA +493 -0
- package/payload/THIRD_PARTY_NOTICES/sse_starlette-3.7.0.dist-info/licenses/AUTHORS +10 -0
- package/payload/THIRD_PARTY_NOTICES/sse_starlette-3.7.0.dist-info/licenses/LICENSE +27 -0
- package/payload/THIRD_PARTY_NOTICES/starlette-1.10.0.dist-info/METADATA +181 -0
- package/payload/THIRD_PARTY_NOTICES/starlette-1.10.0.dist-info/licenses/LICENSE.md +27 -0
- package/payload/THIRD_PARTY_NOTICES/textual-6.12.0.dist-info/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/textual-6.12.0.dist-info/METADATA +265 -0
- package/payload/THIRD_PARTY_NOTICES/tomlkit-0.15.2.dist-info/METADATA +93 -0
- package/payload/THIRD_PARTY_NOTICES/tomlkit-0.15.2.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/trove_classifiers-2026.9.21.13.dist-info/METADATA +82 -0
- package/payload/THIRD_PARTY_NOTICES/trove_classifiers-2026.9.21.13.dist-info/licenses/LICENSE +201 -0
- package/payload/THIRD_PARTY_NOTICES/truststore-0.10.5.dist-info/METADATA +110 -0
- package/payload/THIRD_PARTY_NOTICES/truststore-0.10.5.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/typing_extensions-4.16.0.dist-info/METADATA +73 -0
- package/payload/THIRD_PARTY_NOTICES/typing_extensions-4.16.0.dist-info/licenses/LICENSE +279 -0
- package/payload/THIRD_PARTY_NOTICES/typing_inspection-0.4.5.dist-info/METADATA +49 -0
- package/payload/THIRD_PARTY_NOTICES/typing_inspection-0.4.5.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/uvicorn-0.54.0.dist-info/METADATA +189 -0
- package/payload/THIRD_PARTY_NOTICES/uvicorn-0.54.0.dist-info/licenses/LICENSE.md +27 -0
- package/payload/rhtop +0 -0
- package/README.md +0 -3
package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/packaging-26.3.dist-info/licenses/LICENSE.BSD
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Copyright (c) Donald Stufft and individual contributors.
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
1. Redistributions of source code must retain the above copyright notice,
|
|
8
|
+
this list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer in the
|
|
12
|
+
documentation and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
15
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
16
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
17
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
18
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
19
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
20
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
21
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
22
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
23
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: platformdirs
|
|
3
|
+
Version: 4.4.0
|
|
4
|
+
Summary: A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`.
|
|
5
|
+
Project-URL: Changelog, https://github.com/tox-dev/platformdirs/releases
|
|
6
|
+
Project-URL: Documentation, https://platformdirs.readthedocs.io
|
|
7
|
+
Project-URL: Homepage, https://github.com/tox-dev/platformdirs
|
|
8
|
+
Project-URL: Source, https://github.com/tox-dev/platformdirs
|
|
9
|
+
Project-URL: Tracker, https://github.com/tox-dev/platformdirs/issues
|
|
10
|
+
Maintainer-email: Bernát Gábor <gaborjbernat@gmail.com>, Julian Berman <Julian@GrayVines.com>, Ofek Lev <oss@ofek.dev>, Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: appdirs,application,cache,directory,log,user
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
26
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
27
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
|
+
Requires-Python: >=3.9
|
|
29
|
+
Provides-Extra: docs
|
|
30
|
+
Requires-Dist: furo>=2024.8.6; extra == 'docs'
|
|
31
|
+
Requires-Dist: proselint>=0.14; extra == 'docs'
|
|
32
|
+
Requires-Dist: sphinx-autodoc-typehints>=3; extra == 'docs'
|
|
33
|
+
Requires-Dist: sphinx>=8.1.3; extra == 'docs'
|
|
34
|
+
Provides-Extra: test
|
|
35
|
+
Requires-Dist: appdirs==1.4.4; extra == 'test'
|
|
36
|
+
Requires-Dist: covdefaults>=2.3; extra == 'test'
|
|
37
|
+
Requires-Dist: pytest-cov>=6; extra == 'test'
|
|
38
|
+
Requires-Dist: pytest-mock>=3.14; extra == 'test'
|
|
39
|
+
Requires-Dist: pytest>=8.3.4; extra == 'test'
|
|
40
|
+
Provides-Extra: type
|
|
41
|
+
Requires-Dist: mypy>=1.14.1; extra == 'type'
|
|
42
|
+
Description-Content-Type: text/x-rst
|
|
43
|
+
|
|
44
|
+
The problem
|
|
45
|
+
===========
|
|
46
|
+
|
|
47
|
+
.. image:: https://badge.fury.io/py/platformdirs.svg
|
|
48
|
+
:target: https://badge.fury.io/py/platformdirs
|
|
49
|
+
.. image:: https://img.shields.io/pypi/pyversions/platformdirs.svg
|
|
50
|
+
:target: https://pypi.python.org/pypi/platformdirs/
|
|
51
|
+
.. image:: https://github.com/tox-dev/platformdirs/actions/workflows/check.yaml/badge.svg
|
|
52
|
+
:target: https://github.com/platformdirs/platformdirs/actions
|
|
53
|
+
.. image:: https://static.pepy.tech/badge/platformdirs/month
|
|
54
|
+
:target: https://pepy.tech/project/platformdirs
|
|
55
|
+
|
|
56
|
+
When writing desktop application, finding the right location to store user data
|
|
57
|
+
and configuration varies per platform. Even for single-platform apps, there
|
|
58
|
+
may by plenty of nuances in figuring out the right location.
|
|
59
|
+
|
|
60
|
+
For example, if running on macOS, you should use::
|
|
61
|
+
|
|
62
|
+
~/Library/Application Support/<AppName>
|
|
63
|
+
|
|
64
|
+
If on Windows (at least English Win) that should be::
|
|
65
|
+
|
|
66
|
+
C:\Documents and Settings\<User>\Application Data\Local Settings\<AppAuthor>\<AppName>
|
|
67
|
+
|
|
68
|
+
or possibly::
|
|
69
|
+
|
|
70
|
+
C:\Documents and Settings\<User>\Application Data\<AppAuthor>\<AppName>
|
|
71
|
+
|
|
72
|
+
for `roaming profiles <https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc766489(v=ws.10)>`_ but that is another story.
|
|
73
|
+
|
|
74
|
+
On Linux (and other Unices), according to the `XDG Basedir Spec`_, it should be::
|
|
75
|
+
|
|
76
|
+
~/.local/share/<AppName>
|
|
77
|
+
|
|
78
|
+
.. _XDG Basedir Spec: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
|
79
|
+
|
|
80
|
+
``platformdirs`` to the rescue
|
|
81
|
+
==============================
|
|
82
|
+
|
|
83
|
+
This kind of thing is what the ``platformdirs`` package is for.
|
|
84
|
+
``platformdirs`` will help you choose an appropriate:
|
|
85
|
+
|
|
86
|
+
- user data dir (``user_data_dir``)
|
|
87
|
+
- user config dir (``user_config_dir``)
|
|
88
|
+
- user cache dir (``user_cache_dir``)
|
|
89
|
+
- site data dir (``site_data_dir``)
|
|
90
|
+
- site config dir (``site_config_dir``)
|
|
91
|
+
- user log dir (``user_log_dir``)
|
|
92
|
+
- user documents dir (``user_documents_dir``)
|
|
93
|
+
- user downloads dir (``user_downloads_dir``)
|
|
94
|
+
- user pictures dir (``user_pictures_dir``)
|
|
95
|
+
- user videos dir (``user_videos_dir``)
|
|
96
|
+
- user music dir (``user_music_dir``)
|
|
97
|
+
- user desktop dir (``user_desktop_dir``)
|
|
98
|
+
- user runtime dir (``user_runtime_dir``)
|
|
99
|
+
|
|
100
|
+
And also:
|
|
101
|
+
|
|
102
|
+
- Is slightly opinionated on the directory names used. Look for "OPINION" in
|
|
103
|
+
documentation and code for when an opinion is being applied.
|
|
104
|
+
|
|
105
|
+
Example output
|
|
106
|
+
==============
|
|
107
|
+
|
|
108
|
+
On macOS:
|
|
109
|
+
|
|
110
|
+
.. code-block:: pycon
|
|
111
|
+
|
|
112
|
+
>>> from platformdirs import *
|
|
113
|
+
>>> appname = "SuperApp"
|
|
114
|
+
>>> appauthor = "Acme"
|
|
115
|
+
>>> user_data_dir(appname, appauthor)
|
|
116
|
+
'/Users/trentm/Library/Application Support/SuperApp'
|
|
117
|
+
>>> user_config_dir(appname, appauthor)
|
|
118
|
+
'/Users/trentm/Library/Application Support/SuperApp'
|
|
119
|
+
>>> user_cache_dir(appname, appauthor)
|
|
120
|
+
'/Users/trentm/Library/Caches/SuperApp'
|
|
121
|
+
>>> site_data_dir(appname, appauthor)
|
|
122
|
+
'/Library/Application Support/SuperApp'
|
|
123
|
+
>>> site_config_dir(appname, appauthor)
|
|
124
|
+
'/Library/Application Support/SuperApp'
|
|
125
|
+
>>> user_log_dir(appname, appauthor)
|
|
126
|
+
'/Users/trentm/Library/Logs/SuperApp'
|
|
127
|
+
>>> user_documents_dir()
|
|
128
|
+
'/Users/trentm/Documents'
|
|
129
|
+
>>> user_downloads_dir()
|
|
130
|
+
'/Users/trentm/Downloads'
|
|
131
|
+
>>> user_pictures_dir()
|
|
132
|
+
'/Users/trentm/Pictures'
|
|
133
|
+
>>> user_videos_dir()
|
|
134
|
+
'/Users/trentm/Movies'
|
|
135
|
+
>>> user_music_dir()
|
|
136
|
+
'/Users/trentm/Music'
|
|
137
|
+
>>> user_desktop_dir()
|
|
138
|
+
'/Users/trentm/Desktop'
|
|
139
|
+
>>> user_runtime_dir(appname, appauthor)
|
|
140
|
+
'/Users/trentm/Library/Caches/TemporaryItems/SuperApp'
|
|
141
|
+
|
|
142
|
+
On Windows:
|
|
143
|
+
|
|
144
|
+
.. code-block:: pycon
|
|
145
|
+
|
|
146
|
+
>>> from platformdirs import *
|
|
147
|
+
>>> appname = "SuperApp"
|
|
148
|
+
>>> appauthor = "Acme"
|
|
149
|
+
>>> user_data_dir(appname, appauthor)
|
|
150
|
+
'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp'
|
|
151
|
+
>>> user_data_dir(appname, appauthor, roaming=True)
|
|
152
|
+
'C:\\Users\\trentm\\AppData\\Roaming\\Acme\\SuperApp'
|
|
153
|
+
>>> user_config_dir(appname, appauthor)
|
|
154
|
+
'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp'
|
|
155
|
+
>>> user_cache_dir(appname, appauthor)
|
|
156
|
+
'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp\\Cache'
|
|
157
|
+
>>> site_data_dir(appname, appauthor)
|
|
158
|
+
'C:\\ProgramData\\Acme\\SuperApp'
|
|
159
|
+
>>> site_config_dir(appname, appauthor)
|
|
160
|
+
'C:\\ProgramData\\Acme\\SuperApp'
|
|
161
|
+
>>> user_log_dir(appname, appauthor)
|
|
162
|
+
'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp\\Logs'
|
|
163
|
+
>>> user_documents_dir()
|
|
164
|
+
'C:\\Users\\trentm\\Documents'
|
|
165
|
+
>>> user_downloads_dir()
|
|
166
|
+
'C:\\Users\\trentm\\Downloads'
|
|
167
|
+
>>> user_pictures_dir()
|
|
168
|
+
'C:\\Users\\trentm\\Pictures'
|
|
169
|
+
>>> user_videos_dir()
|
|
170
|
+
'C:\\Users\\trentm\\Videos'
|
|
171
|
+
>>> user_music_dir()
|
|
172
|
+
'C:\\Users\\trentm\\Music'
|
|
173
|
+
>>> user_desktop_dir()
|
|
174
|
+
'C:\\Users\\trentm\\Desktop'
|
|
175
|
+
>>> user_runtime_dir(appname, appauthor)
|
|
176
|
+
'C:\\Users\\trentm\\AppData\\Local\\Temp\\Acme\\SuperApp'
|
|
177
|
+
|
|
178
|
+
On Linux:
|
|
179
|
+
|
|
180
|
+
.. code-block:: pycon
|
|
181
|
+
|
|
182
|
+
>>> from platformdirs import *
|
|
183
|
+
>>> appname = "SuperApp"
|
|
184
|
+
>>> appauthor = "Acme"
|
|
185
|
+
>>> user_data_dir(appname, appauthor)
|
|
186
|
+
'/home/trentm/.local/share/SuperApp'
|
|
187
|
+
>>> user_config_dir(appname)
|
|
188
|
+
'/home/trentm/.config/SuperApp'
|
|
189
|
+
>>> user_cache_dir(appname, appauthor)
|
|
190
|
+
'/home/trentm/.cache/SuperApp'
|
|
191
|
+
>>> site_data_dir(appname, appauthor)
|
|
192
|
+
'/usr/local/share/SuperApp'
|
|
193
|
+
>>> site_data_dir(appname, appauthor, multipath=True)
|
|
194
|
+
'/usr/local/share/SuperApp:/usr/share/SuperApp'
|
|
195
|
+
>>> site_config_dir(appname)
|
|
196
|
+
'/etc/xdg/SuperApp'
|
|
197
|
+
>>> os.environ["XDG_CONFIG_DIRS"] = "/etc:/usr/local/etc"
|
|
198
|
+
>>> site_config_dir(appname, multipath=True)
|
|
199
|
+
'/etc/SuperApp:/usr/local/etc/SuperApp'
|
|
200
|
+
>>> user_log_dir(appname, appauthor)
|
|
201
|
+
'/home/trentm/.local/state/SuperApp/log'
|
|
202
|
+
>>> user_documents_dir()
|
|
203
|
+
'/home/trentm/Documents'
|
|
204
|
+
>>> user_downloads_dir()
|
|
205
|
+
'/home/trentm/Downloads'
|
|
206
|
+
>>> user_pictures_dir()
|
|
207
|
+
'/home/trentm/Pictures'
|
|
208
|
+
>>> user_videos_dir()
|
|
209
|
+
'/home/trentm/Videos'
|
|
210
|
+
>>> user_music_dir()
|
|
211
|
+
'/home/trentm/Music'
|
|
212
|
+
>>> user_desktop_dir()
|
|
213
|
+
'/home/trentm/Desktop'
|
|
214
|
+
>>> user_runtime_dir(appname, appauthor)
|
|
215
|
+
'/run/user/{os.getuid()}/SuperApp'
|
|
216
|
+
|
|
217
|
+
On Android::
|
|
218
|
+
|
|
219
|
+
>>> from platformdirs import *
|
|
220
|
+
>>> appname = "SuperApp"
|
|
221
|
+
>>> appauthor = "Acme"
|
|
222
|
+
>>> user_data_dir(appname, appauthor)
|
|
223
|
+
'/data/data/com.myApp/files/SuperApp'
|
|
224
|
+
>>> user_config_dir(appname)
|
|
225
|
+
'/data/data/com.myApp/shared_prefs/SuperApp'
|
|
226
|
+
>>> user_cache_dir(appname, appauthor)
|
|
227
|
+
'/data/data/com.myApp/cache/SuperApp'
|
|
228
|
+
>>> site_data_dir(appname, appauthor)
|
|
229
|
+
'/data/data/com.myApp/files/SuperApp'
|
|
230
|
+
>>> site_config_dir(appname)
|
|
231
|
+
'/data/data/com.myApp/shared_prefs/SuperApp'
|
|
232
|
+
>>> user_log_dir(appname, appauthor)
|
|
233
|
+
'/data/data/com.myApp/cache/SuperApp/log'
|
|
234
|
+
>>> user_documents_dir()
|
|
235
|
+
'/storage/emulated/0/Documents'
|
|
236
|
+
>>> user_downloads_dir()
|
|
237
|
+
'/storage/emulated/0/Downloads'
|
|
238
|
+
>>> user_pictures_dir()
|
|
239
|
+
'/storage/emulated/0/Pictures'
|
|
240
|
+
>>> user_videos_dir()
|
|
241
|
+
'/storage/emulated/0/DCIM/Camera'
|
|
242
|
+
>>> user_music_dir()
|
|
243
|
+
'/storage/emulated/0/Music'
|
|
244
|
+
>>> user_desktop_dir()
|
|
245
|
+
'/storage/emulated/0/Desktop'
|
|
246
|
+
>>> user_runtime_dir(appname, appauthor)
|
|
247
|
+
'/data/data/com.myApp/cache/SuperApp/tmp'
|
|
248
|
+
|
|
249
|
+
Note: Some android apps like Termux and Pydroid are used as shells. These
|
|
250
|
+
apps are used by the end user to emulate Linux environment. Presence of
|
|
251
|
+
``SHELL`` environment variable is used by Platformdirs to differentiate
|
|
252
|
+
between general android apps and android apps used as shells. Shell android
|
|
253
|
+
apps also support ``XDG_*`` environment variables.
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
``PlatformDirs`` for convenience
|
|
257
|
+
================================
|
|
258
|
+
|
|
259
|
+
.. code-block:: pycon
|
|
260
|
+
|
|
261
|
+
>>> from platformdirs import PlatformDirs
|
|
262
|
+
>>> dirs = PlatformDirs("SuperApp", "Acme")
|
|
263
|
+
>>> dirs.user_data_dir
|
|
264
|
+
'/Users/trentm/Library/Application Support/SuperApp'
|
|
265
|
+
>>> dirs.user_config_dir
|
|
266
|
+
'/Users/trentm/Library/Application Support/SuperApp'
|
|
267
|
+
>>> dirs.user_cache_dir
|
|
268
|
+
'/Users/trentm/Library/Caches/SuperApp'
|
|
269
|
+
>>> dirs.site_data_dir
|
|
270
|
+
'/Library/Application Support/SuperApp'
|
|
271
|
+
>>> dirs.site_config_dir
|
|
272
|
+
'/Library/Application Support/SuperApp'
|
|
273
|
+
>>> dirs.user_cache_dir
|
|
274
|
+
'/Users/trentm/Library/Caches/SuperApp'
|
|
275
|
+
>>> dirs.user_log_dir
|
|
276
|
+
'/Users/trentm/Library/Logs/SuperApp'
|
|
277
|
+
>>> dirs.user_documents_dir
|
|
278
|
+
'/Users/trentm/Documents'
|
|
279
|
+
>>> dirs.user_downloads_dir
|
|
280
|
+
'/Users/trentm/Downloads'
|
|
281
|
+
>>> dirs.user_pictures_dir
|
|
282
|
+
'/Users/trentm/Pictures'
|
|
283
|
+
>>> dirs.user_videos_dir
|
|
284
|
+
'/Users/trentm/Movies'
|
|
285
|
+
>>> dirs.user_music_dir
|
|
286
|
+
'/Users/trentm/Music'
|
|
287
|
+
>>> dirs.user_desktop_dir
|
|
288
|
+
'/Users/trentm/Desktop'
|
|
289
|
+
>>> dirs.user_runtime_dir
|
|
290
|
+
'/Users/trentm/Library/Caches/TemporaryItems/SuperApp'
|
|
291
|
+
|
|
292
|
+
Per-version isolation
|
|
293
|
+
=====================
|
|
294
|
+
|
|
295
|
+
If you have multiple versions of your app in use that you want to be
|
|
296
|
+
able to run side-by-side, then you may want version-isolation for these
|
|
297
|
+
dirs::
|
|
298
|
+
|
|
299
|
+
>>> from platformdirs import PlatformDirs
|
|
300
|
+
>>> dirs = PlatformDirs("SuperApp", "Acme", version="1.0")
|
|
301
|
+
>>> dirs.user_data_dir
|
|
302
|
+
'/Users/trentm/Library/Application Support/SuperApp/1.0'
|
|
303
|
+
>>> dirs.user_config_dir
|
|
304
|
+
'/Users/trentm/Library/Application Support/SuperApp/1.0'
|
|
305
|
+
>>> dirs.user_cache_dir
|
|
306
|
+
'/Users/trentm/Library/Caches/SuperApp/1.0'
|
|
307
|
+
>>> dirs.site_data_dir
|
|
308
|
+
'/Library/Application Support/SuperApp/1.0'
|
|
309
|
+
>>> dirs.site_config_dir
|
|
310
|
+
'/Library/Application Support/SuperApp/1.0'
|
|
311
|
+
>>> dirs.user_log_dir
|
|
312
|
+
'/Users/trentm/Library/Logs/SuperApp/1.0'
|
|
313
|
+
>>> dirs.user_documents_dir
|
|
314
|
+
'/Users/trentm/Documents'
|
|
315
|
+
>>> dirs.user_downloads_dir
|
|
316
|
+
'/Users/trentm/Downloads'
|
|
317
|
+
>>> dirs.user_pictures_dir
|
|
318
|
+
'/Users/trentm/Pictures'
|
|
319
|
+
>>> dirs.user_videos_dir
|
|
320
|
+
'/Users/trentm/Movies'
|
|
321
|
+
>>> dirs.user_music_dir
|
|
322
|
+
'/Users/trentm/Music'
|
|
323
|
+
>>> dirs.user_desktop_dir
|
|
324
|
+
'/Users/trentm/Desktop'
|
|
325
|
+
>>> dirs.user_runtime_dir
|
|
326
|
+
'/Users/trentm/Library/Caches/TemporaryItems/SuperApp/1.0'
|
|
327
|
+
|
|
328
|
+
Be wary of using this for configuration files though; you'll need to handle
|
|
329
|
+
migrating configuration files manually.
|
|
330
|
+
|
|
331
|
+
Why this Fork?
|
|
332
|
+
==============
|
|
333
|
+
|
|
334
|
+
This repository is a friendly fork of the wonderful work started by
|
|
335
|
+
`ActiveState <https://github.com/ActiveState/appdirs>`_ who created
|
|
336
|
+
``appdirs``, this package's ancestor.
|
|
337
|
+
|
|
338
|
+
Maintaining an open source project is no easy task, particularly
|
|
339
|
+
from within an organization, and the Python community is indebted
|
|
340
|
+
to ``appdirs`` (and to Trent Mick and Jeff Rouse in particular) for
|
|
341
|
+
creating an incredibly useful simple module, as evidenced by the wide
|
|
342
|
+
number of users it has attracted over the years.
|
|
343
|
+
|
|
344
|
+
Nonetheless, given the number of long-standing open issues
|
|
345
|
+
and pull requests, and no clear path towards `ensuring
|
|
346
|
+
that maintenance of the package would continue or grow
|
|
347
|
+
<https://github.com/ActiveState/appdirs/issues/79>`_, this fork was
|
|
348
|
+
created.
|
|
349
|
+
|
|
350
|
+
Contributions are most welcome.
|
package/payload/THIRD_PARTY_NOTICES/setuptools/_vendor/platformdirs-4.4.0.dist-info/licenses/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2010-202x The platformdirs developers
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tomli
|
|
3
|
+
Version: 2.4.0
|
|
4
|
+
Summary: A lil' TOML parser
|
|
5
|
+
Keywords: toml
|
|
6
|
+
Author-email: Taneli Hukkinen <hukkin@users.noreply.github.com>
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Classifier: Operating System :: MacOS
|
|
11
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
12
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
15
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
16
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
+
Classifier: Typing :: Typed
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Project-URL: Changelog, https://github.com/hukkin/tomli/blob/master/CHANGELOG.md
|
|
20
|
+
Project-URL: Homepage, https://github.com/hukkin/tomli
|
|
21
|
+
|
|
22
|
+
[](https://github.com/hukkin/tomli/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush)
|
|
23
|
+
[](https://codecov.io/gh/hukkin/tomli)
|
|
24
|
+
[](https://pypi.org/project/tomli)
|
|
25
|
+
|
|
26
|
+
# Tomli
|
|
27
|
+
|
|
28
|
+
> A lil' TOML parser
|
|
29
|
+
|
|
30
|
+
**Table of Contents** *generated with [mdformat-toc](https://github.com/hukkin/mdformat-toc)*
|
|
31
|
+
|
|
32
|
+
<!-- mdformat-toc start --slug=github --maxlevel=6 --minlevel=2 -->
|
|
33
|
+
|
|
34
|
+
- [Intro](#intro)
|
|
35
|
+
- [Installation](#installation)
|
|
36
|
+
- [Usage](#usage)
|
|
37
|
+
- [Parse a TOML string](#parse-a-toml-string)
|
|
38
|
+
- [Parse a TOML file](#parse-a-toml-file)
|
|
39
|
+
- [Handle invalid TOML](#handle-invalid-toml)
|
|
40
|
+
- [Construct `decimal.Decimal`s from TOML floats](#construct-decimaldecimals-from-toml-floats)
|
|
41
|
+
- [Building a `tomli`/`tomllib` compatibility layer](#building-a-tomlitomllib-compatibility-layer)
|
|
42
|
+
- [FAQ](#faq)
|
|
43
|
+
- [Why this parser?](#why-this-parser)
|
|
44
|
+
- [Is comment preserving round-trip parsing supported?](#is-comment-preserving-round-trip-parsing-supported)
|
|
45
|
+
- [Is there a `dumps`, `write` or `encode` function?](#is-there-a-dumps-write-or-encode-function)
|
|
46
|
+
- [How do TOML types map into Python types?](#how-do-toml-types-map-into-python-types)
|
|
47
|
+
- [Performance](#performance)
|
|
48
|
+
- [Pure Python](#pure-python)
|
|
49
|
+
- [Mypyc generated wheel](#mypyc-generated-wheel)
|
|
50
|
+
|
|
51
|
+
<!-- mdformat-toc end -->
|
|
52
|
+
|
|
53
|
+
## Intro<a name="intro"></a>
|
|
54
|
+
|
|
55
|
+
Tomli is a Python library for parsing [TOML](https://toml.io).
|
|
56
|
+
Version 2.4.0 and later are compatible with [TOML v1.1.0](https://toml.io/en/v1.1.0).
|
|
57
|
+
Older versions are [TOML v1.0.0](https://toml.io/en/v1.0.0) compatible.
|
|
58
|
+
|
|
59
|
+
A version of Tomli, the `tomllib` module,
|
|
60
|
+
was added to the standard library in Python 3.11
|
|
61
|
+
via [PEP 680](https://www.python.org/dev/peps/pep-0680/).
|
|
62
|
+
Tomli continues to provide a backport on PyPI for Python versions
|
|
63
|
+
where the standard library module is not available
|
|
64
|
+
and that have not yet reached their end-of-life.
|
|
65
|
+
|
|
66
|
+
Tomli uses [mypyc](https://github.com/mypyc/mypyc)
|
|
67
|
+
to generate binary wheels for most of the widely used platforms,
|
|
68
|
+
so Python 3.11+ users may prefer it over `tomllib` for improved performance.
|
|
69
|
+
Pure Python wheels are available on any platform and should perform the same as `tomllib`.
|
|
70
|
+
|
|
71
|
+
## Installation<a name="installation"></a>
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install tomli
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Usage<a name="usage"></a>
|
|
78
|
+
|
|
79
|
+
### Parse a TOML string<a name="parse-a-toml-string"></a>
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
import tomli
|
|
83
|
+
|
|
84
|
+
toml_str = """
|
|
85
|
+
[[players]]
|
|
86
|
+
name = "Lehtinen"
|
|
87
|
+
number = 26
|
|
88
|
+
|
|
89
|
+
[[players]]
|
|
90
|
+
name = "Numminen"
|
|
91
|
+
number = 27
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
toml_dict = tomli.loads(toml_str)
|
|
95
|
+
assert toml_dict == {
|
|
96
|
+
"players": [{"name": "Lehtinen", "number": 26}, {"name": "Numminen", "number": 27}]
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Parse a TOML file<a name="parse-a-toml-file"></a>
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
import tomli
|
|
104
|
+
|
|
105
|
+
with open("path_to_file/conf.toml", "rb") as f:
|
|
106
|
+
toml_dict = tomli.load(f)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The file must be opened in binary mode (with the `"rb"` flag).
|
|
110
|
+
Binary mode will enforce decoding the file as UTF-8 with universal newlines disabled,
|
|
111
|
+
both of which are required to correctly parse TOML.
|
|
112
|
+
|
|
113
|
+
### Handle invalid TOML<a name="handle-invalid-toml"></a>
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
import tomli
|
|
117
|
+
|
|
118
|
+
try:
|
|
119
|
+
toml_dict = tomli.loads("]] this is invalid TOML [[")
|
|
120
|
+
except tomli.TOMLDecodeError:
|
|
121
|
+
print("Yep, definitely not valid.")
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Note that error messages are considered informational only.
|
|
125
|
+
They should not be assumed to stay constant across Tomli versions.
|
|
126
|
+
|
|
127
|
+
### Construct `decimal.Decimal`s from TOML floats<a name="construct-decimaldecimals-from-toml-floats"></a>
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
from decimal import Decimal
|
|
131
|
+
import tomli
|
|
132
|
+
|
|
133
|
+
toml_dict = tomli.loads("precision-matters = 0.982492", parse_float=Decimal)
|
|
134
|
+
assert isinstance(toml_dict["precision-matters"], Decimal)
|
|
135
|
+
assert toml_dict["precision-matters"] == Decimal("0.982492")
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Note that `decimal.Decimal` can be replaced with another callable that converts a TOML float from string to a Python type.
|
|
139
|
+
The `decimal.Decimal` is, however, a practical choice for use cases where float inaccuracies can not be tolerated.
|
|
140
|
+
|
|
141
|
+
Illegal types are `dict` and `list`, and their subtypes.
|
|
142
|
+
A `ValueError` will be raised if `parse_float` produces illegal types.
|
|
143
|
+
|
|
144
|
+
### Building a `tomli`/`tomllib` compatibility layer<a name="building-a-tomlitomllib-compatibility-layer"></a>
|
|
145
|
+
|
|
146
|
+
Python versions 3.11+ ship with a version of Tomli:
|
|
147
|
+
the `tomllib` standard library module.
|
|
148
|
+
To build code that uses the standard library if available,
|
|
149
|
+
but still works seamlessly with Python 3.6+,
|
|
150
|
+
do the following.
|
|
151
|
+
|
|
152
|
+
Instead of a hard Tomli dependency, use the following
|
|
153
|
+
[dependency specifier](https://packaging.python.org/en/latest/specifications/dependency-specifiers/)
|
|
154
|
+
to only require Tomli when the standard library module is not available:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
tomli >= 1.1.0 ; python_version < "3.11"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Then, in your code, import a TOML parser using the following fallback mechanism:
|
|
161
|
+
|
|
162
|
+
```python
|
|
163
|
+
import sys
|
|
164
|
+
|
|
165
|
+
if sys.version_info >= (3, 11):
|
|
166
|
+
import tomllib
|
|
167
|
+
else:
|
|
168
|
+
import tomli as tomllib
|
|
169
|
+
|
|
170
|
+
tomllib.loads("['This parses fine with Python 3.6+']")
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## FAQ<a name="faq"></a>
|
|
174
|
+
|
|
175
|
+
### Why this parser?<a name="why-this-parser"></a>
|
|
176
|
+
|
|
177
|
+
- it's lil'
|
|
178
|
+
- pure Python with zero dependencies
|
|
179
|
+
- the fastest pure Python parser [\*](#pure-python):
|
|
180
|
+
18x as fast as [tomlkit](https://pypi.org/project/tomlkit/),
|
|
181
|
+
2.1x as fast as [toml](https://pypi.org/project/toml/)
|
|
182
|
+
- outputs [basic data types](#how-do-toml-types-map-into-python-types) only
|
|
183
|
+
- 100% spec compliant: passes all tests in
|
|
184
|
+
[toml-lang/toml-test](https://github.com/toml-lang/toml-test)
|
|
185
|
+
test suite
|
|
186
|
+
- thoroughly tested: 100% branch coverage
|
|
187
|
+
|
|
188
|
+
### Is comment preserving round-trip parsing supported?<a name="is-comment-preserving-round-trip-parsing-supported"></a>
|
|
189
|
+
|
|
190
|
+
No.
|
|
191
|
+
|
|
192
|
+
The `tomli.loads` function returns a plain `dict` that is populated with builtin types and types from the standard library only.
|
|
193
|
+
Preserving comments requires a custom type to be returned so will not be supported,
|
|
194
|
+
at least not by the `tomli.loads` and `tomli.load` functions.
|
|
195
|
+
|
|
196
|
+
Look into [TOML Kit](https://github.com/sdispater/tomlkit) if preservation of style is what you need.
|
|
197
|
+
|
|
198
|
+
### Is there a `dumps`, `write` or `encode` function?<a name="is-there-a-dumps-write-or-encode-function"></a>
|
|
199
|
+
|
|
200
|
+
[Tomli-W](https://github.com/hukkin/tomli-w) is the write-only counterpart of Tomli, providing `dump` and `dumps` functions.
|
|
201
|
+
|
|
202
|
+
The core library does not include write capability, as most TOML use cases are read-only, and Tomli intends to be minimal.
|
|
203
|
+
|
|
204
|
+
### How do TOML types map into Python types?<a name="how-do-toml-types-map-into-python-types"></a>
|
|
205
|
+
|
|
206
|
+
| TOML type | Python type | Details |
|
|
207
|
+
| ---------------- | ------------------- | ------------------------------------------------------------ |
|
|
208
|
+
| Document Root | `dict` | |
|
|
209
|
+
| Key | `str` | |
|
|
210
|
+
| String | `str` | |
|
|
211
|
+
| Integer | `int` | |
|
|
212
|
+
| Float | `float` | |
|
|
213
|
+
| Boolean | `bool` | |
|
|
214
|
+
| Offset Date-Time | `datetime.datetime` | `tzinfo` attribute set to an instance of `datetime.timezone` |
|
|
215
|
+
| Local Date-Time | `datetime.datetime` | `tzinfo` attribute set to `None` |
|
|
216
|
+
| Local Date | `datetime.date` | |
|
|
217
|
+
| Local Time | `datetime.time` | |
|
|
218
|
+
| Array | `list` | |
|
|
219
|
+
| Table | `dict` | |
|
|
220
|
+
| Inline Table | `dict` | |
|
|
221
|
+
|
|
222
|
+
## Performance<a name="performance"></a>
|
|
223
|
+
|
|
224
|
+
The `benchmark/` folder in this repository contains a performance benchmark for comparing the various Python TOML parsers.
|
|
225
|
+
|
|
226
|
+
Below are the results for commit [0724e2a](https://github.com/hukkin/tomli/tree/0724e2ab1858da7f5e05a9bffdb24c33589d951c).
|
|
227
|
+
|
|
228
|
+
### Pure Python<a name="pure-python"></a>
|
|
229
|
+
|
|
230
|
+
```console
|
|
231
|
+
foo@bar:~/dev/tomli$ python --version
|
|
232
|
+
Python 3.12.7
|
|
233
|
+
foo@bar:~/dev/tomli$ pip freeze
|
|
234
|
+
attrs==21.4.0
|
|
235
|
+
click==8.1.7
|
|
236
|
+
pytomlpp==1.0.13
|
|
237
|
+
qtoml==0.3.1
|
|
238
|
+
rtoml==0.11.0
|
|
239
|
+
toml==0.10.2
|
|
240
|
+
tomli @ file:///home/foo/dev/tomli
|
|
241
|
+
tomlkit==0.13.2
|
|
242
|
+
foo@bar:~/dev/tomli$ python benchmark/run.py
|
|
243
|
+
Parsing data.toml 5000 times:
|
|
244
|
+
------------------------------------------------------
|
|
245
|
+
parser | exec time | performance (more is better)
|
|
246
|
+
-----------+------------+-----------------------------
|
|
247
|
+
rtoml | 0.647 s | baseline (100%)
|
|
248
|
+
pytomlpp | 0.891 s | 72.62%
|
|
249
|
+
tomli | 3.14 s | 20.56%
|
|
250
|
+
toml | 6.69 s | 9.67%
|
|
251
|
+
qtoml | 8.27 s | 7.82%
|
|
252
|
+
tomlkit | 56.1 s | 1.15%
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Mypyc generated wheel<a name="mypyc-generated-wheel"></a>
|
|
256
|
+
|
|
257
|
+
```console
|
|
258
|
+
foo@bar:~/dev/tomli$ python benchmark/run.py
|
|
259
|
+
Parsing data.toml 5000 times:
|
|
260
|
+
------------------------------------------------------
|
|
261
|
+
parser | exec time | performance (more is better)
|
|
262
|
+
-----------+------------+-----------------------------
|
|
263
|
+
rtoml | 0.668 s | baseline (100%)
|
|
264
|
+
pytomlpp | 0.893 s | 74.81%
|
|
265
|
+
tomli | 1.96 s | 34.18%
|
|
266
|
+
toml | 6.64 s | 10.07%
|
|
267
|
+
qtoml | 8.26 s | 8.09%
|
|
268
|
+
tomlkit | 52.9 s | 1.26%
|
|
269
|
+
```
|
|
270
|
+
|