Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .cache/pip/http-v2/1/0/e/d/c/10edc2fedb88f9a82f91dc7f8666c74a4e7067dbd945b9923a040482 +0 -0
- .cache/pip/http-v2/1/1/9/5/7/1195798be39bae85ab9a92775e7685467975f51fe91bf51524268ec2 +0 -0
- .cache/pip/http-v2/1/2/2/4/d/1224d41bab5732a8d21be164d733fc715ab79618a9f55d40126a01df +0 -0
- .cache/pip/http-v2/1/3/d/6/c/13d6c9b226a47b42b3e13d13ced85b25bb3ea4e70b2e24144ee06cc7 +0 -0
- .cache/pip/http-v2/1/3/d/6/c/13d6c9b226a47b42b3e13d13ced85b25bb3ea4e70b2e24144ee06cc7.body +172 -0
- .cache/pip/http-v2/1/6/9/3/2/1693297fb9daf7bfe370bf51d371acfeb8ff40759bf8650dfd404ba4 +0 -0
- .cache/pip/http-v2/1/a/9/9/5/1a995e0685d0b5c5a3f3321cda9ebcbc376a9137828d1c100a493532 +0 -0
- .cache/pip/http-v2/1/a/9/9/5/1a995e0685d0b5c5a3f3321cda9ebcbc376a9137828d1c100a493532.body +0 -0
- .cache/pip/http-v2/1/d/4/2/8/1d428a5d06689b7d452896e7d55bc8c1cbe7b6bd18ff95ec7fc20ef9 +0 -0
- .cache/pip/http-v2/1/d/4/2/8/1d428a5d06689b7d452896e7d55bc8c1cbe7b6bd18ff95ec7fc20ef9.body +0 -0
- .cache/pip/http-v2/1/d/5/6/3/1d563ba9163a5740203eb49569f4a3cdce2455efdbf68b7a0e4df760 +0 -0
- .cache/pip/http-v2/1/d/5/6/3/1d563ba9163a5740203eb49569f4a3cdce2455efdbf68b7a0e4df760.body +0 -0
- .cache/pip/http-v2/1/d/5/8/0/1d580297aa71908bf0d94823d03615447cfaaf5e778d47640756ae80 +0 -0
- .cache/pip/http-v2/1/d/5/8/0/1d580297aa71908bf0d94823d03615447cfaaf5e778d47640756ae80.body +0 -0
- .cache/pip/http-v2/1/d/6/3/7/1d637d02ae164caceb9e1d6b45caef9fd27c976328f51c79997cb6b1 +0 -0
- .cache/pip/http-v2/1/d/6/3/7/1d637d02ae164caceb9e1d6b45caef9fd27c976328f51c79997cb6b1.body +149 -0
- .cache/pip/http-v2/1/e/2/b/1/1e2b1734fc3c57a4733131da81a6167573fc77057172172ceee83a22 +0 -0
- .cache/pip/http-v2/1/e/2/b/1/1e2b1734fc3c57a4733131da81a6167573fc77057172172ceee83a22.body +0 -0
- .cache/pip/http-v2/1/f/3/4/9/1f349e0deeb9992d953b7a87b8b52ca1d3b9051701bb310f8f841ba1 +0 -0
- .cache/pip/http-v2/1/f/3/4/9/1f349e0deeb9992d953b7a87b8b52ca1d3b9051701bb310f8f841ba1.body +462 -0
- .cache/pip/http-v2/2/3/4/4/6/23446cc6157b1ce7d0c47be470d3e3e086ba28baabb823def5b31de1 +0 -0
- .cache/pip/http-v2/2/3/a/5/7/23a575b8601c8c49e9a0fd63487db1739b1a0406347c42c1c166c0ba +0 -0
- .cache/pip/http-v2/2/3/a/5/7/23a575b8601c8c49e9a0fd63487db1739b1a0406347c42c1c166c0ba.body +0 -0
- .cache/pip/http-v2/2/5/a/f/d/25afd7bec39eb254f13f9daa9b4c62d6a9064757b6157a85184cbb13 +0 -0
- .cache/pip/http-v2/2/5/a/f/d/25afd7bec39eb254f13f9daa9b4c62d6a9064757b6157a85184cbb13.body +639 -0
- .cache/pip/http-v2/2/6/4/1/7/264179aeab1d8942e5f72419f2c39e8a5577779f5155b081e3ad0fd8 +0 -0
- .cache/pip/http-v2/2/6/4/1/7/264179aeab1d8942e5f72419f2c39e8a5577779f5155b081e3ad0fd8.body +0 -0
- .cache/pip/http-v2/2/7/7/8/7/277873b37b2358d20641cc2f5b361df0315b7f461701720c2d25eb6c +0 -0
- .cache/pip/http-v2/2/9/8/b/6/298b673430df8f0a35ee4db6f607ebf574ee261ade83cef6af0b4bbc +0 -0
- .cache/pip/http-v2/2/9/8/b/6/298b673430df8f0a35ee4db6f607ebf574ee261ade83cef6af0b4bbc.body +586 -0
- .cache/pip/http-v2/2/9/f/a/a/29faa3e056e1121f184f57a41776ad530481b463d3e654420e75baa9 +0 -0
- .cache/pip/http-v2/2/b/0/a/4/2b0a4fda1a2c912a5a1c5245a8b34b5da87876e311f607befabc98ee +0 -0
- .cache/pip/http-v2/2/b/0/a/4/2b0a4fda1a2c912a5a1c5245a8b34b5da87876e311f607befabc98ee.body +0 -0
- .cache/pip/http-v2/2/b/c/4/6/2bc462f2fe975661ddcee00520817d6e0e56e0d082ec661011b21a6b +0 -0
- .cache/pip/http-v2/2/b/c/4/6/2bc462f2fe975661ddcee00520817d6e0e56e0d082ec661011b21a6b.body +0 -0
- .cache/pip/http-v2/2/c/9/b/6/2c9b61ac2fe4234e3e98894b97f9565b9cc3ed29c40275c61efc4076 +0 -0
- .cache/pip/http-v2/2/d/2/7/4/2d274909802a294101952666e88fb2e3b7731b90c4e0fa9015d5a2c9 +0 -0
- .cache/pip/http-v2/2/d/2/7/4/2d274909802a294101952666e88fb2e3b7731b90c4e0fa9015d5a2c9.body +145 -0
- .cache/pip/http-v2/2/d/d/6/6/2dd66b0fcdd4067819bad62a54cb0add7bd0c1efcbf542054ba991c4 +0 -0
- .cache/pip/http-v2/2/d/d/6/6/2dd66b0fcdd4067819bad62a54cb0add7bd0c1efcbf542054ba991c4.body +214 -0
- .cache/pip/http-v2/5/2/0/5/a/5205a928a42073130f8425c1223b628bd19f7bcadf716204477ab472 +0 -0
- .cache/pip/http-v2/5/2/0/5/a/5205a928a42073130f8425c1223b628bd19f7bcadf716204477ab472.body +1086 -0
- .cache/pip/http-v2/5/3/c/6/f/53c6f1b77a8f1e352a63c5345029a5605eefe3a3b447be5197ecbdf6 +0 -0
- .cache/pip/http-v2/5/7/9/6/9/579696a4d0ec2ed4bd10e921a9322921fc84cd85037e43849a2550e4 +0 -0
- .cache/pip/http-v2/5/7/9/6/9/579696a4d0ec2ed4bd10e921a9322921fc84cd85037e43849a2550e4.body +76 -0
- .cache/pip/http-v2/5/7/9/e/2/579e2ad9657050287391093fa10622681dc2a40279585c8bd02ee23b +0 -0
- .cache/pip/http-v2/5/b/e/6/4/5be64dddf357efe8e015c621695508a39823691e4777c7d90558ec8b +0 -0
- .cache/pip/http-v2/5/c/3/a/d/5c3adee19af20e371ea5467aaf0afa1ef775c17213954479df44f6af +0 -0
- .cache/pip/http-v2/5/c/3/a/d/5c3adee19af20e371ea5467aaf0afa1ef775c17213954479df44f6af.body +0 -0
- .cache/pip/http-v2/5/c/7/3/2/5c7324e1f6f306065fa6d1263cbce82c8310fb4475bb74e6f90422e3 +0 -0
.cache/pip/http-v2/1/0/e/d/c/10edc2fedb88f9a82f91dc7f8666c74a4e7067dbd945b9923a040482
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/1/1/9/5/7/1195798be39bae85ab9a92775e7685467975f51fe91bf51524268ec2
ADDED
|
Binary file (1.16 kB). View file
|
|
|
.cache/pip/http-v2/1/2/2/4/d/1224d41bab5732a8d21be164d733fc715ab79618a9f55d40126a01df
ADDED
|
Binary file (1.13 kB). View file
|
|
|
.cache/pip/http-v2/1/3/d/6/c/13d6c9b226a47b42b3e13d13ced85b25bb3ea4e70b2e24144ee06cc7
ADDED
|
Binary file (1.22 kB). View file
|
|
|
.cache/pip/http-v2/1/3/d/6/c/13d6c9b226a47b42b3e13d13ced85b25bb3ea4e70b2e24144ee06cc7.body
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: joblib
|
| 3 |
+
Version: 1.5.3
|
| 4 |
+
Summary: Lightweight pipelining with Python functions
|
| 5 |
+
Author-email: Gael Varoquaux <gael.varoquaux@normalesup.org>
|
| 6 |
+
License-Expression: BSD-3-Clause
|
| 7 |
+
Project-URL: Homepage, https://joblib.readthedocs.io
|
| 8 |
+
Project-URL: Source, https://github.com/joblib/joblib
|
| 9 |
+
Platform: any
|
| 10 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 11 |
+
Classifier: Environment :: Console
|
| 12 |
+
Classifier: Intended Audience :: Developers
|
| 13 |
+
Classifier: Intended Audience :: Science/Research
|
| 14 |
+
Classifier: Intended Audience :: Education
|
| 15 |
+
Classifier: Operating System :: OS Independent
|
| 16 |
+
Classifier: Programming Language :: Python :: 3
|
| 17 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 18 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 19 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 20 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 21 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 22 |
+
Classifier: Topic :: Scientific/Engineering
|
| 23 |
+
Classifier: Topic :: Utilities
|
| 24 |
+
Classifier: Topic :: Software Development :: Libraries
|
| 25 |
+
Requires-Python: >=3.9
|
| 26 |
+
Description-Content-Type: text/x-rst
|
| 27 |
+
License-File: LICENSE.txt
|
| 28 |
+
Dynamic: license-file
|
| 29 |
+
|
| 30 |
+
|PyPi| |CIStatus| |ReadTheDocs| |Codecov|
|
| 31 |
+
|
| 32 |
+
.. |PyPi| image:: https://badge.fury.io/py/joblib.svg
|
| 33 |
+
:target: https://badge.fury.io/py/joblib
|
| 34 |
+
:alt: Joblib version
|
| 35 |
+
|
| 36 |
+
.. |CIStatus| image:: https://github.com/joblib/joblib/actions/workflows/test.yml/badge.svg
|
| 37 |
+
:target: https://github.com/joblib/joblib/actions/workflows/test.yml?query=branch%3Amain
|
| 38 |
+
:alt: CI status
|
| 39 |
+
|
| 40 |
+
.. |ReadTheDocs| image:: https://readthedocs.org/projects/joblib/badge/?version=latest
|
| 41 |
+
:target: https://joblib.readthedocs.io/en/latest/?badge=latest
|
| 42 |
+
:alt: Documentation Status
|
| 43 |
+
|
| 44 |
+
.. |Codecov| image:: https://codecov.io/gh/joblib/joblib/branch/main/graph/badge.svg
|
| 45 |
+
:target: https://codecov.io/gh/joblib/joblib
|
| 46 |
+
:alt: Codecov coverage
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
The homepage of joblib with user documentation is located on:
|
| 50 |
+
|
| 51 |
+
https://joblib.readthedocs.io
|
| 52 |
+
|
| 53 |
+
Getting the latest code
|
| 54 |
+
=======================
|
| 55 |
+
|
| 56 |
+
To get the latest code using git, simply type::
|
| 57 |
+
|
| 58 |
+
git clone https://github.com/joblib/joblib.git
|
| 59 |
+
|
| 60 |
+
If you don't have git installed, you can download a zip
|
| 61 |
+
of the latest code: https://github.com/joblib/joblib/archive/refs/heads/main.zip
|
| 62 |
+
|
| 63 |
+
Installing
|
| 64 |
+
==========
|
| 65 |
+
|
| 66 |
+
You can use `pip` to install joblib from any directory::
|
| 67 |
+
|
| 68 |
+
pip install joblib
|
| 69 |
+
|
| 70 |
+
or install it in editable mode from the source directory::
|
| 71 |
+
|
| 72 |
+
pip install -e .
|
| 73 |
+
|
| 74 |
+
Dependencies
|
| 75 |
+
============
|
| 76 |
+
|
| 77 |
+
- Joblib has no mandatory dependencies besides Python (supported versions are
|
| 78 |
+
3.9+).
|
| 79 |
+
- Joblib has an optional dependency on Numpy (at least version 1.6.1) for array
|
| 80 |
+
manipulation.
|
| 81 |
+
- Joblib includes its own vendored copy of
|
| 82 |
+
`loky <https://github.com/tomMoral/loky>`_ for process management.
|
| 83 |
+
- Joblib can efficiently dump and load numpy arrays but does not require numpy
|
| 84 |
+
to be installed.
|
| 85 |
+
- Joblib has an optional dependency on
|
| 86 |
+
`python-lz4 <https://pypi.python.org/pypi/lz4>`_ as a faster alternative to
|
| 87 |
+
zlib and gzip for compressed serialization.
|
| 88 |
+
- Joblib has an optional dependency on psutil to mitigate memory leaks in
|
| 89 |
+
parallel worker processes.
|
| 90 |
+
- Some examples require external dependencies such as pandas. See the
|
| 91 |
+
instructions in the `Building the docs`_ section for details.
|
| 92 |
+
|
| 93 |
+
Workflow to contribute
|
| 94 |
+
======================
|
| 95 |
+
|
| 96 |
+
To contribute to joblib, first create an account on `github
|
| 97 |
+
<https://github.com/>`_. Once this is done, fork the `joblib repository
|
| 98 |
+
<https://github.com/joblib/joblib>`_ to have your own repository,
|
| 99 |
+
clone it using ``git clone``. Make your changes in a branch of your clone, push
|
| 100 |
+
them to your github account, test them locally, and when you are happy with
|
| 101 |
+
them, send a pull request to the main repository.
|
| 102 |
+
|
| 103 |
+
You can use `pre-commit <https://pre-commit.com/#install>`_ to run code style checks
|
| 104 |
+
before each commit::
|
| 105 |
+
|
| 106 |
+
pip install pre-commit
|
| 107 |
+
pre-commit install
|
| 108 |
+
|
| 109 |
+
pre-commit checks can be disabled for a single commit with::
|
| 110 |
+
|
| 111 |
+
git commit -n
|
| 112 |
+
|
| 113 |
+
Running the test suite
|
| 114 |
+
======================
|
| 115 |
+
|
| 116 |
+
To run the test suite, you need the pytest (version >= 3) and coverage modules.
|
| 117 |
+
Run the test suite using::
|
| 118 |
+
|
| 119 |
+
pytest joblib
|
| 120 |
+
|
| 121 |
+
from the root of the project.
|
| 122 |
+
|
| 123 |
+
Building the docs
|
| 124 |
+
=================
|
| 125 |
+
|
| 126 |
+
To build the docs you need to have sphinx (>=1.4) and some dependencies
|
| 127 |
+
installed::
|
| 128 |
+
|
| 129 |
+
pip install -U -r .readthedocs-requirements.txt
|
| 130 |
+
|
| 131 |
+
The docs can then be built with the following command::
|
| 132 |
+
|
| 133 |
+
make doc
|
| 134 |
+
|
| 135 |
+
The html docs are located in the ``doc/_build/html`` directory.
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
Making a source tarball
|
| 139 |
+
=======================
|
| 140 |
+
|
| 141 |
+
To create a source tarball, eg for packaging or distributing, run the
|
| 142 |
+
following command::
|
| 143 |
+
|
| 144 |
+
pip install build
|
| 145 |
+
python -m build --sdist
|
| 146 |
+
|
| 147 |
+
The tarball will be created in the `dist` directory. This command will create
|
| 148 |
+
the resulting tarball that can be installed with no extra dependencies than the
|
| 149 |
+
Python standard library.
|
| 150 |
+
|
| 151 |
+
Making a release and uploading it to PyPI
|
| 152 |
+
=========================================
|
| 153 |
+
|
| 154 |
+
This command is only run by project manager, to make a release, and
|
| 155 |
+
upload in to PyPI::
|
| 156 |
+
|
| 157 |
+
pip install build
|
| 158 |
+
python -m build --sdist --wheel
|
| 159 |
+
twine upload dist/*
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
Note that the documentation should automatically get updated at each git
|
| 163 |
+
push. If that is not the case, try building th doc locally and resolve
|
| 164 |
+
any doc build error (in particular when running the examples).
|
| 165 |
+
|
| 166 |
+
Updating the changelog
|
| 167 |
+
======================
|
| 168 |
+
|
| 169 |
+
Changes are listed in the CHANGES.rst file. They must be manually updated
|
| 170 |
+
but, the following git command may be used to generate the lines::
|
| 171 |
+
|
| 172 |
+
git log --abbrev-commit --date=short --no-merges --sparse
|
.cache/pip/http-v2/1/6/9/3/2/1693297fb9daf7bfe370bf51d371acfeb8ff40759bf8650dfd404ba4
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/1/a/9/9/5/1a995e0685d0b5c5a3f3321cda9ebcbc376a9137828d1c100a493532
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/1/a/9/9/5/1a995e0685d0b5c5a3f3321cda9ebcbc376a9137828d1c100a493532.body
ADDED
|
Binary file (12 kB). View file
|
|
|
.cache/pip/http-v2/1/d/4/2/8/1d428a5d06689b7d452896e7d55bc8c1cbe7b6bd18ff95ec7fc20ef9
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/1/d/4/2/8/1d428a5d06689b7d452896e7d55bc8c1cbe7b6bd18ff95ec7fc20ef9.body
ADDED
|
Binary file (52.1 kB). View file
|
|
|
.cache/pip/http-v2/1/d/5/6/3/1d563ba9163a5740203eb49569f4a3cdce2455efdbf68b7a0e4df760
ADDED
|
Binary file (1.16 kB). View file
|
|
|
.cache/pip/http-v2/1/d/5/6/3/1d563ba9163a5740203eb49569f4a3cdce2455efdbf68b7a0e4df760.body
ADDED
|
Binary file (76.1 kB). View file
|
|
|
.cache/pip/http-v2/1/d/5/8/0/1d580297aa71908bf0d94823d03615447cfaaf5e778d47640756ae80
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/1/d/5/8/0/1d580297aa71908bf0d94823d03615447cfaaf5e778d47640756ae80.body
ADDED
|
Binary file (29 kB). View file
|
|
|
.cache/pip/http-v2/1/d/6/3/7/1d637d02ae164caceb9e1d6b45caef9fd27c976328f51c79997cb6b1
ADDED
|
Binary file (1.17 kB). View file
|
|
|
.cache/pip/http-v2/1/d/6/3/7/1d637d02ae164caceb9e1d6b45caef9fd27c976328f51c79997cb6b1.body
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: multidict
|
| 3 |
+
Version: 6.7.1
|
| 4 |
+
Summary: multidict implementation
|
| 5 |
+
Home-page: https://github.com/aio-libs/multidict
|
| 6 |
+
Author: Andrew Svetlov
|
| 7 |
+
Author-email: andrew.svetlov@gmail.com
|
| 8 |
+
License: Apache License 2.0
|
| 9 |
+
Project-URL: Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org
|
| 10 |
+
Project-URL: Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org
|
| 11 |
+
Project-URL: CI: GitHub, https://github.com/aio-libs/multidict/actions
|
| 12 |
+
Project-URL: Code of Conduct, https://github.com/aio-libs/.github/blob/master/CODE_OF_CONDUCT.md
|
| 13 |
+
Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/multidict
|
| 14 |
+
Project-URL: Docs: Changelog, https://multidict.aio-libs.org/en/latest/changes/
|
| 15 |
+
Project-URL: Docs: RTD, https://multidict.aio-libs.org
|
| 16 |
+
Project-URL: GitHub: issues, https://github.com/aio-libs/multidict/issues
|
| 17 |
+
Project-URL: GitHub: repo, https://github.com/aio-libs/multidict
|
| 18 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 19 |
+
Classifier: Intended Audience :: Developers
|
| 20 |
+
Classifier: Programming Language :: Python
|
| 21 |
+
Classifier: Programming Language :: Python :: 3
|
| 22 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 23 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 24 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 25 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 26 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 27 |
+
Classifier: Programming Language :: Python :: 3.14
|
| 28 |
+
Requires-Python: >=3.9
|
| 29 |
+
Description-Content-Type: text/x-rst
|
| 30 |
+
License-File: LICENSE
|
| 31 |
+
Requires-Dist: typing-extensions>=4.1.0; python_version < "3.11"
|
| 32 |
+
Dynamic: license-file
|
| 33 |
+
|
| 34 |
+
=========
|
| 35 |
+
multidict
|
| 36 |
+
=========
|
| 37 |
+
|
| 38 |
+
.. image:: https://github.com/aio-libs/multidict/actions/workflows/ci-cd.yml/badge.svg
|
| 39 |
+
:target: https://github.com/aio-libs/multidict/actions
|
| 40 |
+
:alt: GitHub status for master branch
|
| 41 |
+
|
| 42 |
+
.. image:: https://codecov.io/gh/aio-libs/multidict/branch/master/graph/badge.svg?flag=pytest
|
| 43 |
+
:target: https://codecov.io/gh/aio-libs/multidict?flags[]=pytest
|
| 44 |
+
:alt: Coverage metrics
|
| 45 |
+
|
| 46 |
+
.. image:: https://img.shields.io/pypi/v/multidict.svg
|
| 47 |
+
:target: https://pypi.org/project/multidict
|
| 48 |
+
:alt: PyPI
|
| 49 |
+
|
| 50 |
+
.. image:: https://readthedocs.org/projects/multidict/badge/?version=latest
|
| 51 |
+
:target: https://multidict.aio-libs.org
|
| 52 |
+
:alt: Read The Docs build status badge
|
| 53 |
+
|
| 54 |
+
.. image:: https://img.shields.io/endpoint?url=https://codspeed.io/badge.json
|
| 55 |
+
:target: https://codspeed.io/aio-libs/multidict
|
| 56 |
+
:alt: CodSpeed
|
| 57 |
+
|
| 58 |
+
.. image:: https://img.shields.io/pypi/pyversions/multidict.svg
|
| 59 |
+
:target: https://pypi.org/project/multidict
|
| 60 |
+
:alt: Python versions
|
| 61 |
+
|
| 62 |
+
.. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
|
| 63 |
+
:target: https://matrix.to/#/%23aio-libs:matrix.org
|
| 64 |
+
:alt: Matrix Room — #aio-libs:matrix.org
|
| 65 |
+
|
| 66 |
+
.. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
|
| 67 |
+
:target: https://matrix.to/#/%23aio-libs-space:matrix.org
|
| 68 |
+
:alt: Matrix Space — #aio-libs-space:matrix.org
|
| 69 |
+
|
| 70 |
+
Multidict is dict-like collection of *key-value pairs* where key
|
| 71 |
+
might occur more than once in the container.
|
| 72 |
+
|
| 73 |
+
Introduction
|
| 74 |
+
------------
|
| 75 |
+
|
| 76 |
+
*HTTP Headers* and *URL query string* require specific data structure:
|
| 77 |
+
*multidict*. It behaves mostly like a regular ``dict`` but it may have
|
| 78 |
+
several *values* for the same *key* and *preserves insertion ordering*.
|
| 79 |
+
|
| 80 |
+
The *key* is ``str`` (or ``istr`` for case-insensitive dictionaries).
|
| 81 |
+
|
| 82 |
+
``multidict`` has four multidict classes:
|
| 83 |
+
``MultiDict``, ``MultiDictProxy``, ``CIMultiDict``
|
| 84 |
+
and ``CIMultiDictProxy``.
|
| 85 |
+
|
| 86 |
+
Immutable proxies (``MultiDictProxy`` and
|
| 87 |
+
``CIMultiDictProxy``) provide a dynamic view for the
|
| 88 |
+
proxied multidict, the view reflects underlying collection changes. They
|
| 89 |
+
implement the ``collections.abc.Mapping`` interface.
|
| 90 |
+
|
| 91 |
+
Regular mutable (``MultiDict`` and ``CIMultiDict``) classes
|
| 92 |
+
implement ``collections.abc.MutableMapping`` and allows them to change
|
| 93 |
+
their own content.
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
*Case insensitive* (``CIMultiDict`` and
|
| 97 |
+
``CIMultiDictProxy``) assume the *keys* are case
|
| 98 |
+
insensitive, e.g.::
|
| 99 |
+
|
| 100 |
+
>>> dct = CIMultiDict(key='val')
|
| 101 |
+
>>> 'Key' in dct
|
| 102 |
+
True
|
| 103 |
+
>>> dct['Key']
|
| 104 |
+
'val'
|
| 105 |
+
|
| 106 |
+
*Keys* should be ``str`` or ``istr`` instances.
|
| 107 |
+
|
| 108 |
+
The library has optional C Extensions for speed.
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
License
|
| 112 |
+
-------
|
| 113 |
+
|
| 114 |
+
Apache 2
|
| 115 |
+
|
| 116 |
+
Library Installation
|
| 117 |
+
--------------------
|
| 118 |
+
|
| 119 |
+
.. code-block:: bash
|
| 120 |
+
|
| 121 |
+
$ pip install multidict
|
| 122 |
+
|
| 123 |
+
The library is Python 3 only!
|
| 124 |
+
|
| 125 |
+
PyPI contains binary wheels for Linux, Windows and MacOS. If you want to install
|
| 126 |
+
``multidict`` on another operating system (or *Alpine Linux* inside a Docker) the
|
| 127 |
+
tarball will be used to compile the library from source. It requires a C compiler and
|
| 128 |
+
Python headers to be installed.
|
| 129 |
+
|
| 130 |
+
To skip the compilation, please use the `MULTIDICT_NO_EXTENSIONS` environment variable,
|
| 131 |
+
e.g.:
|
| 132 |
+
|
| 133 |
+
.. code-block:: bash
|
| 134 |
+
|
| 135 |
+
$ MULTIDICT_NO_EXTENSIONS=1 pip install multidict
|
| 136 |
+
|
| 137 |
+
Please note, the pure Python (uncompiled) version is about 20-50 times slower depending on
|
| 138 |
+
the usage scenario!!!
|
| 139 |
+
|
| 140 |
+
For extension development, set the ``MULTIDICT_DEBUG_BUILD`` environment variable to compile
|
| 141 |
+
the extensions in debug mode:
|
| 142 |
+
|
| 143 |
+
.. code-block:: console
|
| 144 |
+
|
| 145 |
+
$ MULTIDICT_DEBUG_BUILD=1 pip install multidict
|
| 146 |
+
|
| 147 |
+
Changelog
|
| 148 |
+
---------
|
| 149 |
+
See `RTD page <http://multidict.aio-libs.org/en/latest/changes>`_.
|
.cache/pip/http-v2/1/e/2/b/1/1e2b1734fc3c57a4733131da81a6167573fc77057172172ceee83a22
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/1/e/2/b/1/1e2b1734fc3c57a4733131da81a6167573fc77057172172ceee83a22.body
ADDED
|
Binary file (6.44 kB). View file
|
|
|
.cache/pip/http-v2/1/f/3/4/9/1f349e0deeb9992d953b7a87b8b52ca1d3b9051701bb310f8f841ba1
ADDED
|
Binary file (1.2 kB). View file
|
|
|
.cache/pip/http-v2/1/f/3/4/9/1f349e0deeb9992d953b7a87b8b52ca1d3b9051701bb310f8f841ba1.body
ADDED
|
@@ -0,0 +1,462 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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Version: 2.3
|
| 2 |
+
Name: loguru
|
| 3 |
+
Version: 0.7.3
|
| 4 |
+
Summary: Python logging made (stupidly) simple
|
| 5 |
+
Keywords: loguru,logging,logger,log
|
| 6 |
+
Author-email: Delgan <delgan.py@gmail.com>
|
| 7 |
+
Requires-Python: >=3.5,<4.0
|
| 8 |
+
Description-Content-Type: text/markdown
|
| 9 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 10 |
+
Classifier: Topic :: System :: Logging
|
| 11 |
+
Classifier: Intended Audience :: Developers
|
| 12 |
+
Classifier: Natural Language :: English
|
| 13 |
+
Classifier: License :: OSI Approved :: MIT License
|
| 14 |
+
Classifier: Operating System :: OS Independent
|
| 15 |
+
Classifier: Programming Language :: Python
|
| 16 |
+
Classifier: Programming Language :: Python :: 3
|
| 17 |
+
Classifier: Programming Language :: Python :: 3.5
|
| 18 |
+
Classifier: Programming Language :: Python :: 3.6
|
| 19 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 20 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 21 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 22 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 23 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 24 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 25 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 26 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 27 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
| 28 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
| 29 |
+
Requires-Dist: colorama>=0.3.4 ; sys_platform=='win32'
|
| 30 |
+
Requires-Dist: aiocontextvars>=0.2.0 ; python_version<'3.7'
|
| 31 |
+
Requires-Dist: win32-setctime>=1.0.0 ; sys_platform=='win32'
|
| 32 |
+
Requires-Dist: pre-commit==4.0.1 ; extra == "dev" and ( python_version>='3.9')
|
| 33 |
+
Requires-Dist: tox==3.27.1 ; extra == "dev" and ( python_version<'3.8')
|
| 34 |
+
Requires-Dist: tox==4.23.2 ; extra == "dev" and ( python_version>='3.8')
|
| 35 |
+
Requires-Dist: pytest==6.1.2 ; extra == "dev" and ( python_version<'3.8')
|
| 36 |
+
Requires-Dist: pytest==8.3.2 ; extra == "dev" and ( python_version>='3.8')
|
| 37 |
+
Requires-Dist: pytest-cov==2.12.1 ; extra == "dev" and ( python_version<'3.8')
|
| 38 |
+
Requires-Dist: pytest-cov==5.0.0 ; extra == "dev" and ( python_version>='3.8' and python_version<'3.9')
|
| 39 |
+
Requires-Dist: pytest-cov==6.0.0 ; extra == "dev" and ( python_version>='3.9')
|
| 40 |
+
Requires-Dist: pytest-mypy-plugins==1.9.3 ; extra == "dev" and ( python_version>='3.6' and python_version<'3.8')
|
| 41 |
+
Requires-Dist: pytest-mypy-plugins==3.1.0 ; extra == "dev" and ( python_version>='3.8')
|
| 42 |
+
Requires-Dist: colorama==0.4.5 ; extra == "dev" and ( python_version<'3.8')
|
| 43 |
+
Requires-Dist: colorama==0.4.6 ; extra == "dev" and ( python_version>='3.8')
|
| 44 |
+
Requires-Dist: freezegun==1.1.0 ; extra == "dev" and ( python_version<'3.8')
|
| 45 |
+
Requires-Dist: freezegun==1.5.0 ; extra == "dev" and ( python_version>='3.8')
|
| 46 |
+
Requires-Dist: exceptiongroup==1.1.3 ; extra == "dev" and ( python_version>='3.7' and python_version<'3.11')
|
| 47 |
+
Requires-Dist: mypy==v0.910 ; extra == "dev" and ( python_version<'3.6')
|
| 48 |
+
Requires-Dist: mypy==v0.971 ; extra == "dev" and ( python_version>='3.6' and python_version<'3.7')
|
| 49 |
+
Requires-Dist: mypy==v1.4.1 ; extra == "dev" and ( python_version>='3.7' and python_version<'3.8')
|
| 50 |
+
Requires-Dist: mypy==v1.13.0 ; extra == "dev" and ( python_version>='3.8')
|
| 51 |
+
Requires-Dist: Sphinx==8.1.3 ; extra == "dev" and ( python_version>='3.11')
|
| 52 |
+
Requires-Dist: sphinx-rtd-theme==3.0.2 ; extra == "dev" and ( python_version>='3.11')
|
| 53 |
+
Requires-Dist: myst-parser==4.0.0 ; extra == "dev" and ( python_version>='3.11')
|
| 54 |
+
Requires-Dist: build==1.2.2 ; extra == "dev" and ( python_version>='3.11')
|
| 55 |
+
Requires-Dist: twine==6.0.1 ; extra == "dev" and ( python_version>='3.11')
|
| 56 |
+
Project-URL: Changelog, https://github.com/Delgan/loguru/blob/master/CHANGELOG.rst
|
| 57 |
+
Project-URL: Documentation, https://loguru.readthedocs.io/en/stable/index.html
|
| 58 |
+
Project-URL: Homepage, https://github.com/Delgan/loguru
|
| 59 |
+
Provides-Extra: dev
|
| 60 |
+
|
| 61 |
+
<p align="center">
|
| 62 |
+
<a href="#readme">
|
| 63 |
+
<img alt="Loguru logo" src="https://raw.githubusercontent.com/Delgan/loguru/master/docs/_static/img/logo.png">
|
| 64 |
+
<!-- Logo credits: Sambeet from Pixaday -->
|
| 65 |
+
<!-- Logo fonts: Comfortaa + Raleway -->
|
| 66 |
+
</a>
|
| 67 |
+
</p>
|
| 68 |
+
<p align="center">
|
| 69 |
+
<a href="https://pypi.python.org/pypi/loguru"><img alt="Pypi version" src="https://img.shields.io/pypi/v/loguru.svg"></a>
|
| 70 |
+
<a href="https://pypi.python.org/pypi/loguru"><img alt="Python versions" src="https://img.shields.io/badge/python-3.5%2B%20%7C%20PyPy-blue.svg"></a>
|
| 71 |
+
<a href="https://loguru.readthedocs.io/en/stable/index.html"><img alt="Documentation" src="https://img.shields.io/readthedocs/loguru.svg"></a>
|
| 72 |
+
<a href="https://github.com/Delgan/loguru/actions/workflows/tests.yml?query=branch:master"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/Delgan/loguru/tests.yml?branch=master"></a>
|
| 73 |
+
<a href="https://codecov.io/gh/delgan/loguru/branch/master"><img alt="Coverage" src="https://img.shields.io/codecov/c/github/delgan/loguru/master.svg"></a>
|
| 74 |
+
<a href="https://app.codacy.com/gh/Delgan/loguru/dashboard"><img alt="Code quality" src="https://img.shields.io/codacy/grade/be7337df3c0d40d1929eb7f79b1671a6.svg"></a>
|
| 75 |
+
<a href="https://github.com/Delgan/loguru/blob/master/LICENSE"><img alt="License" src="https://img.shields.io/github/license/delgan/loguru.svg"></a>
|
| 76 |
+
</p>
|
| 77 |
+
<p align="center">
|
| 78 |
+
<a href="#readme">
|
| 79 |
+
<img alt="Loguru logo" src="https://raw.githubusercontent.com/Delgan/loguru/master/docs/_static/img/demo.gif">
|
| 80 |
+
</a>
|
| 81 |
+
</p>
|
| 82 |
+
|
| 83 |
+
______________________________________________________________________
|
| 84 |
+
|
| 85 |
+
**Loguru** is a library which aims to bring enjoyable logging in Python.
|
| 86 |
+
|
| 87 |
+
Did you ever feel lazy about configuring a logger and used `print()` instead?... I did, yet logging is fundamental to every application and eases the process of debugging. Using **Loguru** you have no excuse not to use logging from the start, this is as simple as `from loguru import logger`.
|
| 88 |
+
|
| 89 |
+
Also, this library is intended to make Python logging less painful by adding a bunch of useful functionalities that solve caveats of the standard loggers. Using logs in your application should be an automatism, **Loguru** tries to make it both pleasant and powerful.
|
| 90 |
+
|
| 91 |
+
<!-- end-of-readme-intro -->
|
| 92 |
+
|
| 93 |
+
## Installation
|
| 94 |
+
|
| 95 |
+
```
|
| 96 |
+
pip install loguru
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
## Features
|
| 100 |
+
|
| 101 |
+
- [Ready to use out of the box without boilerplate](#ready-to-use-out-of-the-box-without-boilerplate)
|
| 102 |
+
- [No Handler, no Formatter, no Filter: one function to rule them all](#no-handler-no-formatter-no-filter-one-function-to-rule-them-all)
|
| 103 |
+
- [Easier file logging with rotation / retention / compression](#easier-file-logging-with-rotation--retention--compression)
|
| 104 |
+
- [Modern string formatting using braces style](#modern-string-formatting-using-braces-style)
|
| 105 |
+
- [Exceptions catching within threads or main](#exceptions-catching-within-threads-or-main)
|
| 106 |
+
- [Pretty logging with colors](#pretty-logging-with-colors)
|
| 107 |
+
- [Asynchronous, Thread-safe, Multiprocess-safe](#asynchronous-thread-safe-multiprocess-safe)
|
| 108 |
+
- [Fully descriptive exceptions](#fully-descriptive-exceptions)
|
| 109 |
+
- [Structured logging as needed](#structured-logging-as-needed)
|
| 110 |
+
- [Lazy evaluation of expensive functions](#lazy-evaluation-of-expensive-functions)
|
| 111 |
+
- [Customizable levels](#customizable-levels)
|
| 112 |
+
- [Better datetime handling](#better-datetime-handling)
|
| 113 |
+
- [Suitable for scripts and libraries](#suitable-for-scripts-and-libraries)
|
| 114 |
+
- [Entirely compatible with standard logging](#entirely-compatible-with-standard-logging)
|
| 115 |
+
- [Personalizable defaults through environment variables](#personalizable-defaults-through-environment-variables)
|
| 116 |
+
- [Convenient parser](#convenient-parser)
|
| 117 |
+
- [Exhaustive notifier](#exhaustive-notifier)
|
| 118 |
+
- <s>[10x faster than built-in logging](#10x-faster-than-built-in-logging)</s>
|
| 119 |
+
|
| 120 |
+
## Take the tour
|
| 121 |
+
|
| 122 |
+
### Ready to use out of the box without boilerplate
|
| 123 |
+
|
| 124 |
+
The main concept of Loguru is that **there is one and only one** [`logger`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger).
|
| 125 |
+
|
| 126 |
+
For convenience, it is pre-configured and outputs to `stderr` to begin with (but that's entirely configurable).
|
| 127 |
+
|
| 128 |
+
```python
|
| 129 |
+
from loguru import logger
|
| 130 |
+
|
| 131 |
+
logger.debug("That's it, beautiful and simple logging!")
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
The [`logger`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger) is just an interface which dispatches log messages to configured handlers. Simple, right?
|
| 135 |
+
|
| 136 |
+
### No Handler, no Formatter, no Filter: one function to rule them all
|
| 137 |
+
|
| 138 |
+
How to add a handler? How to set up logs formatting? How to filter messages? How to set level?
|
| 139 |
+
|
| 140 |
+
One answer: the [`add()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.add) function.
|
| 141 |
+
|
| 142 |
+
```python
|
| 143 |
+
logger.add(sys.stderr, format="{time} {level} {message}", filter="my_module", level="INFO")
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
This function should be used to register [sinks](https://loguru.readthedocs.io/en/stable/api/logger.html#sink) which are responsible for managing [log messages](https://loguru.readthedocs.io/en/stable/api/logger.html#message) contextualized with a [record dict](https://loguru.readthedocs.io/en/stable/api/logger.html#record). A sink can take many forms: a simple function, a string path, a file-like object, a coroutine function or a built-in Handler.
|
| 147 |
+
|
| 148 |
+
Note that you may also a previously added handler by using the identifier returned while adding it. This is particularly useful if you want to supersede the default `stderr` handler: just call [`logger.remove()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.remove) to make a fresh start.
|
| 149 |
+
|
| 150 |
+
### Easier file logging with rotation / retention / compression
|
| 151 |
+
|
| 152 |
+
If you want to send logged messages to a file, you just have to use a string path as the sink. It can be automatically timed too for convenience:
|
| 153 |
+
|
| 154 |
+
```python
|
| 155 |
+
logger.add("file_{time}.log")
|
| 156 |
+
```
|
| 157 |
+
|
| 158 |
+
It is also [easily configurable](https://loguru.readthedocs.io/en/stable/api/logger.html#file) if you need rotating logger, if you want to remove older logs, or if you wish to compress your files at closure.
|
| 159 |
+
|
| 160 |
+
```python
|
| 161 |
+
logger.add("file_1.log", rotation="500 MB") # Automatically rotate too big file
|
| 162 |
+
logger.add("file_2.log", rotation="12:00") # New file is created each day at noon
|
| 163 |
+
logger.add("file_3.log", rotation="1 week") # Once the file is too old, it's rotated
|
| 164 |
+
|
| 165 |
+
logger.add("file_X.log", retention="10 days") # Cleanup after some time
|
| 166 |
+
|
| 167 |
+
logger.add("file_Y.log", compression="zip") # Save some loved space
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
### Modern string formatting using braces style
|
| 171 |
+
|
| 172 |
+
Loguru favors the much more elegant and powerful `{}` formatting over `%`, logging functions are actually equivalent to `str.format()`.
|
| 173 |
+
|
| 174 |
+
```python
|
| 175 |
+
logger.info("If you're using Python {}, prefer {feature} of course!", 3.6, feature="f-strings")
|
| 176 |
+
```
|
| 177 |
+
|
| 178 |
+
### Exceptions catching within threads or main
|
| 179 |
+
|
| 180 |
+
Have you ever seen your program crashing unexpectedly without seeing anything in the log file? Did you ever notice that exceptions occurring in threads were not logged? This can be solved using the [`catch()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.catch) decorator / context manager which ensures that any error is correctly propagated to the [`logger`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger).
|
| 181 |
+
|
| 182 |
+
```python
|
| 183 |
+
@logger.catch
|
| 184 |
+
def my_function(x, y, z):
|
| 185 |
+
# An error? It's caught anyway!
|
| 186 |
+
return 1 / (x + y + z)
|
| 187 |
+
```
|
| 188 |
+
|
| 189 |
+
### Pretty logging with colors
|
| 190 |
+
|
| 191 |
+
Loguru automatically adds colors to your logs if your terminal is compatible. You can define your favorite style by using [markup tags](https://loguru.readthedocs.io/en/stable/api/logger.html#color) in the sink format.
|
| 192 |
+
|
| 193 |
+
```python
|
| 194 |
+
logger.add(sys.stdout, colorize=True, format="<green>{time}</green> <level>{message}</level>")
|
| 195 |
+
```
|
| 196 |
+
|
| 197 |
+
### Asynchronous, Thread-safe, Multiprocess-safe
|
| 198 |
+
|
| 199 |
+
All sinks added to the [`logger`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger) are thread-safe by default. They are not multiprocess-safe, but you can `enqueue` the messages to ensure logs integrity. This same argument can also be used if you want async logging.
|
| 200 |
+
|
| 201 |
+
```python
|
| 202 |
+
logger.add("somefile.log", enqueue=True)
|
| 203 |
+
```
|
| 204 |
+
|
| 205 |
+
Coroutine functions used as sinks are also supported and should be awaited with [`complete()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.complete).
|
| 206 |
+
|
| 207 |
+
### Fully descriptive exceptions
|
| 208 |
+
|
| 209 |
+
Logging exceptions that occur in your code is important to track bugs, but it's quite useless if you don't know why it failed. Loguru helps you identify problems by allowing the entire stack trace to be displayed, including values of variables (thanks [`better_exceptions`](https://github.com/Qix-/better-exceptions) for this!).
|
| 210 |
+
|
| 211 |
+
The code:
|
| 212 |
+
|
| 213 |
+
```python
|
| 214 |
+
# Caution, "diagnose=True" is the default and may leak sensitive data in prod
|
| 215 |
+
logger.add("out.log", backtrace=True, diagnose=True)
|
| 216 |
+
|
| 217 |
+
def func(a, b):
|
| 218 |
+
return a / b
|
| 219 |
+
|
| 220 |
+
def nested(c):
|
| 221 |
+
try:
|
| 222 |
+
func(5, c)
|
| 223 |
+
except ZeroDivisionError:
|
| 224 |
+
logger.exception("What?!")
|
| 225 |
+
|
| 226 |
+
nested(0)
|
| 227 |
+
```
|
| 228 |
+
|
| 229 |
+
Would result in:
|
| 230 |
+
|
| 231 |
+
```none
|
| 232 |
+
2018-07-17 01:38:43.975 | ERROR | __main__:nested:10 - What?!
|
| 233 |
+
Traceback (most recent call last):
|
| 234 |
+
|
| 235 |
+
File "test.py", line 12, in <module>
|
| 236 |
+
nested(0)
|
| 237 |
+
└ <function nested at 0x7f5c755322f0>
|
| 238 |
+
|
| 239 |
+
> File "test.py", line 8, in nested
|
| 240 |
+
func(5, c)
|
| 241 |
+
│ └ 0
|
| 242 |
+
└ <function func at 0x7f5c79fc2e18>
|
| 243 |
+
|
| 244 |
+
File "test.py", line 4, in func
|
| 245 |
+
return a / b
|
| 246 |
+
│ └ 0
|
| 247 |
+
└ 5
|
| 248 |
+
|
| 249 |
+
ZeroDivisionError: division by zero
|
| 250 |
+
```
|
| 251 |
+
|
| 252 |
+
Note that this feature won't work on default Python REPL due to unavailable frame data.
|
| 253 |
+
|
| 254 |
+
See also: [Security considerations when using Loguru](https://loguru.readthedocs.io/en/stable/resources/recipes.html#security-considerations-when-using-loguru).
|
| 255 |
+
|
| 256 |
+
### Structured logging as needed
|
| 257 |
+
|
| 258 |
+
Want your logs to be serialized for easier parsing or to pass them around? Using the `serialize` argument, each log message will be converted to a JSON string before being sent to the configured sink.
|
| 259 |
+
|
| 260 |
+
```python
|
| 261 |
+
logger.add(custom_sink_function, serialize=True)
|
| 262 |
+
```
|
| 263 |
+
|
| 264 |
+
Using [`bind()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.bind) you can contextualize your logger messages by modifying the `extra` record attribute.
|
| 265 |
+
|
| 266 |
+
```python
|
| 267 |
+
logger.add("file.log", format="{extra[ip]} {extra[user]} {message}")
|
| 268 |
+
context_logger = logger.bind(ip="192.168.0.1", user="someone")
|
| 269 |
+
context_logger.info("Contextualize your logger easily")
|
| 270 |
+
context_logger.bind(user="someone_else").info("Inline binding of extra attribute")
|
| 271 |
+
context_logger.info("Use kwargs to add context during formatting: {user}", user="anybody")
|
| 272 |
+
```
|
| 273 |
+
|
| 274 |
+
It is possible to modify a context-local state temporarily with [`contextualize()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.contextualize):
|
| 275 |
+
|
| 276 |
+
```python
|
| 277 |
+
with logger.contextualize(task=task_id):
|
| 278 |
+
do_something()
|
| 279 |
+
logger.info("End of task")
|
| 280 |
+
```
|
| 281 |
+
|
| 282 |
+
You can also have more fine-grained control over your logs by combining [`bind()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.bind) and `filter`:
|
| 283 |
+
|
| 284 |
+
```python
|
| 285 |
+
logger.add("special.log", filter=lambda record: "special" in record["extra"])
|
| 286 |
+
logger.debug("This message is not logged to the file")
|
| 287 |
+
logger.bind(special=True).info("This message, though, is logged to the file!")
|
| 288 |
+
```
|
| 289 |
+
|
| 290 |
+
Finally, the [`patch()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.patch) method allows dynamic values to be attached to the record dict of each new message:
|
| 291 |
+
|
| 292 |
+
```python
|
| 293 |
+
logger.add(sys.stderr, format="{extra[utc]} {message}")
|
| 294 |
+
logger = logger.patch(lambda record: record["extra"].update(utc=datetime.utcnow()))
|
| 295 |
+
```
|
| 296 |
+
|
| 297 |
+
### Lazy evaluation of expensive functions
|
| 298 |
+
|
| 299 |
+
Sometime you would like to log verbose information without performance penalty in production, you can use the [`opt()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.opt) method to achieve this.
|
| 300 |
+
|
| 301 |
+
```python
|
| 302 |
+
logger.opt(lazy=True).debug("If sink level <= DEBUG: {x}", x=lambda: expensive_function(2**64))
|
| 303 |
+
|
| 304 |
+
# By the way, "opt()" serves many usages
|
| 305 |
+
logger.opt(exception=True).info("Error stacktrace added to the log message (tuple accepted too)")
|
| 306 |
+
logger.opt(colors=True).info("Per message <blue>colors</blue>")
|
| 307 |
+
logger.opt(record=True).info("Display values from the record (eg. {record[thread]})")
|
| 308 |
+
logger.opt(raw=True).info("Bypass sink formatting\n")
|
| 309 |
+
logger.opt(depth=1).info("Use parent stack context (useful within wrapped functions)")
|
| 310 |
+
logger.opt(capture=False).info("Keyword arguments not added to {dest} dict", dest="extra")
|
| 311 |
+
```
|
| 312 |
+
|
| 313 |
+
### Customizable levels
|
| 314 |
+
|
| 315 |
+
Loguru comes with all standard [logging levels](https://loguru.readthedocs.io/en/stable/api/logger.html#levels) to which [`trace()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.trace) and [`success()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.success) are added. Do you need more? Then, just create it by using the [`level()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.level) function.
|
| 316 |
+
|
| 317 |
+
```python
|
| 318 |
+
new_level = logger.level("SNAKY", no=38, color="<yellow>", icon="🐍")
|
| 319 |
+
|
| 320 |
+
logger.log("SNAKY", "Here we go!")
|
| 321 |
+
```
|
| 322 |
+
|
| 323 |
+
### Better datetime handling
|
| 324 |
+
|
| 325 |
+
The standard logging is bloated with arguments like `datefmt` or `msecs`, `%(asctime)s` and `%(created)s`, naive datetimes without timezone information, not intuitive formatting, etc. Loguru [fixes it](https://loguru.readthedocs.io/en/stable/api/logger.html#time):
|
| 326 |
+
|
| 327 |
+
```python
|
| 328 |
+
logger.add("file.log", format="{time:YYYY-MM-DD at HH:mm:ss} | {level} | {message}")
|
| 329 |
+
```
|
| 330 |
+
|
| 331 |
+
### Suitable for scripts and libraries
|
| 332 |
+
|
| 333 |
+
Using the logger in your scripts is easy, and you can [`configure()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.configure) it at start. To use Loguru from inside a library, remember to never call [`add()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.add) but use [`disable()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.disable) instead so logging functions become no-op. If a developer wishes to see your library's logs, they can [`enable()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.enable) it again.
|
| 334 |
+
|
| 335 |
+
```python
|
| 336 |
+
# For scripts
|
| 337 |
+
config = {
|
| 338 |
+
"handlers": [
|
| 339 |
+
{"sink": sys.stdout, "format": "{time} - {message}"},
|
| 340 |
+
{"sink": "file.log", "serialize": True},
|
| 341 |
+
],
|
| 342 |
+
"extra": {"user": "someone"}
|
| 343 |
+
}
|
| 344 |
+
logger.configure(**config)
|
| 345 |
+
|
| 346 |
+
# For libraries, should be your library's `__name__`
|
| 347 |
+
logger.disable("my_library")
|
| 348 |
+
logger.info("No matter added sinks, this message is not displayed")
|
| 349 |
+
|
| 350 |
+
# In your application, enable the logger in the library
|
| 351 |
+
logger.enable("my_library")
|
| 352 |
+
logger.info("This message however is propagated to the sinks")
|
| 353 |
+
```
|
| 354 |
+
|
| 355 |
+
For additional convenience, you can also use the [`loguru-config`](https://github.com/erezinman/loguru-config) library to setup the `logger` directly from a configuration file.
|
| 356 |
+
|
| 357 |
+
### Entirely compatible with standard logging
|
| 358 |
+
|
| 359 |
+
Wish to use built-in logging `Handler` as a Loguru sink?
|
| 360 |
+
|
| 361 |
+
```python
|
| 362 |
+
handler = logging.handlers.SysLogHandler(address=('localhost', 514))
|
| 363 |
+
logger.add(handler)
|
| 364 |
+
```
|
| 365 |
+
|
| 366 |
+
Need to propagate Loguru messages to standard `logging`?
|
| 367 |
+
|
| 368 |
+
```python
|
| 369 |
+
class PropagateHandler(logging.Handler):
|
| 370 |
+
def emit(self, record: logging.LogRecord) -> None:
|
| 371 |
+
logging.getLogger(record.name).handle(record)
|
| 372 |
+
|
| 373 |
+
logger.add(PropagateHandler(), format="{message}")
|
| 374 |
+
```
|
| 375 |
+
|
| 376 |
+
Want to intercept standard `logging` messages toward your Loguru sinks?
|
| 377 |
+
|
| 378 |
+
```python
|
| 379 |
+
class InterceptHandler(logging.Handler):
|
| 380 |
+
def emit(self, record: logging.LogRecord) -> None:
|
| 381 |
+
# Get corresponding Loguru level if it exists.
|
| 382 |
+
level: str | int
|
| 383 |
+
try:
|
| 384 |
+
level = logger.level(record.levelname).name
|
| 385 |
+
except ValueError:
|
| 386 |
+
level = record.levelno
|
| 387 |
+
|
| 388 |
+
# Find caller from where originated the logged message.
|
| 389 |
+
frame, depth = inspect.currentframe(), 0
|
| 390 |
+
while frame and (depth == 0 or frame.f_code.co_filename == logging.__file__):
|
| 391 |
+
frame = frame.f_back
|
| 392 |
+
depth += 1
|
| 393 |
+
|
| 394 |
+
logger.opt(depth=depth, exception=record.exc_info).log(level, record.getMessage())
|
| 395 |
+
|
| 396 |
+
logging.basicConfig(handlers=[InterceptHandler()], level=0, force=True)
|
| 397 |
+
```
|
| 398 |
+
|
| 399 |
+
### Personalizable defaults through environment variables
|
| 400 |
+
|
| 401 |
+
Don't like the default logger formatting? Would prefer another `DEBUG` color? [No problem](https://loguru.readthedocs.io/en/stable/api/logger.html#env):
|
| 402 |
+
|
| 403 |
+
```bash
|
| 404 |
+
# Linux / OSX
|
| 405 |
+
export LOGURU_FORMAT="{time} | <lvl>{message}</lvl>"
|
| 406 |
+
|
| 407 |
+
# Windows
|
| 408 |
+
setx LOGURU_DEBUG_COLOR "<green>"
|
| 409 |
+
```
|
| 410 |
+
|
| 411 |
+
### Convenient parser
|
| 412 |
+
|
| 413 |
+
It is often useful to extract specific information from generated logs, this is why Loguru provides a [`parse()`](https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.parse) method which helps to deal with logs and regexes.
|
| 414 |
+
|
| 415 |
+
```python
|
| 416 |
+
pattern = r"(?P<time>.*) - (?P<level>[0-9]+) - (?P<message>.*)" # Regex with named groups
|
| 417 |
+
caster_dict = dict(time=dateutil.parser.parse, level=int) # Transform matching groups
|
| 418 |
+
|
| 419 |
+
for groups in logger.parse("file.log", pattern, cast=caster_dict):
|
| 420 |
+
print("Parsed:", groups)
|
| 421 |
+
# {"level": 30, "message": "Log example", "time": datetime(2018, 12, 09, 11, 23, 55)}
|
| 422 |
+
```
|
| 423 |
+
|
| 424 |
+
### Exhaustive notifier
|
| 425 |
+
|
| 426 |
+
Loguru can easily be combined with the great [`apprise`](https://github.com/caronc/apprise) library (must be installed separately) to receive an e-mail when your program fail unexpectedly or to send many other kind of notifications.
|
| 427 |
+
|
| 428 |
+
```python
|
| 429 |
+
import apprise
|
| 430 |
+
|
| 431 |
+
# Define the configuration constants.
|
| 432 |
+
WEBHOOK_ID = "123456790"
|
| 433 |
+
WEBHOOK_TOKEN = "abc123def456"
|
| 434 |
+
|
| 435 |
+
# Prepare the object to send Discord notifications.
|
| 436 |
+
notifier = apprise.Apprise()
|
| 437 |
+
notifier.add(f"discord://{WEBHOOK_ID}/{WEBHOOK_TOKEN}")
|
| 438 |
+
|
| 439 |
+
# Install a handler to be alerted on each error.
|
| 440 |
+
# You can filter out logs from "apprise" itself to avoid recursive calls.
|
| 441 |
+
logger.add(notifier.notify, level="ERROR", filter={"apprise": False})
|
| 442 |
+
```
|
| 443 |
+
|
| 444 |
+
<s>
|
| 445 |
+
|
| 446 |
+
### 10x faster than built-in logging
|
| 447 |
+
|
| 448 |
+
</s>
|
| 449 |
+
|
| 450 |
+
Although logging impact on performances is in most cases negligible, a zero-cost logger would allow to use it anywhere without much concern. In an upcoming release, Loguru's critical functions will be implemented in C for maximum speed.
|
| 451 |
+
|
| 452 |
+
<!-- end-of-readme-usage -->
|
| 453 |
+
|
| 454 |
+
## Documentation
|
| 455 |
+
|
| 456 |
+
- [API Reference](https://loguru.readthedocs.io/en/stable/api/logger.html)
|
| 457 |
+
- [Help & Guides](https://loguru.readthedocs.io/en/stable/resources.html)
|
| 458 |
+
- [Type hints](https://loguru.readthedocs.io/en/stable/api/type_hints.html)
|
| 459 |
+
- [Contributing](https://loguru.readthedocs.io/en/stable/project/contributing.html)
|
| 460 |
+
- [License](https://loguru.readthedocs.io/en/stable/project/license.html)
|
| 461 |
+
- [Changelog](https://loguru.readthedocs.io/en/stable/project/changelog.html)
|
| 462 |
+
|
.cache/pip/http-v2/2/3/4/4/6/23446cc6157b1ce7d0c47be470d3e3e086ba28baabb823def5b31de1
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/2/3/a/5/7/23a575b8601c8c49e9a0fd63487db1739b1a0406347c42c1c166c0ba
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/2/3/a/5/7/23a575b8601c8c49e9a0fd63487db1739b1a0406347c42c1c166c0ba.body
ADDED
|
Binary file (14.5 kB). View file
|
|
|
.cache/pip/http-v2/2/5/a/f/d/25afd7bec39eb254f13f9daa9b4c62d6a9064757b6157a85184cbb13
ADDED
|
Binary file (1.2 kB). View file
|
|
|
.cache/pip/http-v2/2/5/a/f/d/25afd7bec39eb254f13f9daa9b4c62d6a9064757b6157a85184cbb13.body
ADDED
|
@@ -0,0 +1,639 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: fastapi
|
| 3 |
+
Version: 0.128.1
|
| 4 |
+
Summary: FastAPI framework, high performance, easy to learn, fast to code, ready for production
|
| 5 |
+
Author-Email: =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <tiangolo@gmail.com>
|
| 6 |
+
License-Expression: MIT
|
| 7 |
+
License-File: LICENSE
|
| 8 |
+
Classifier: Intended Audience :: Information Technology
|
| 9 |
+
Classifier: Intended Audience :: System Administrators
|
| 10 |
+
Classifier: Operating System :: OS Independent
|
| 11 |
+
Classifier: Programming Language :: Python :: 3
|
| 12 |
+
Classifier: Programming Language :: Python
|
| 13 |
+
Classifier: Topic :: Internet
|
| 14 |
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
| 15 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
| 16 |
+
Classifier: Topic :: Software Development :: Libraries
|
| 17 |
+
Classifier: Topic :: Software Development
|
| 18 |
+
Classifier: Typing :: Typed
|
| 19 |
+
Classifier: Development Status :: 4 - Beta
|
| 20 |
+
Classifier: Environment :: Web Environment
|
| 21 |
+
Classifier: Framework :: AsyncIO
|
| 22 |
+
Classifier: Framework :: FastAPI
|
| 23 |
+
Classifier: Framework :: Pydantic
|
| 24 |
+
Classifier: Framework :: Pydantic :: 2
|
| 25 |
+
Classifier: Intended Audience :: Developers
|
| 26 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 27 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 28 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 29 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 30 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 31 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 32 |
+
Classifier: Programming Language :: Python :: 3.14
|
| 33 |
+
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
| 34 |
+
Classifier: Topic :: Internet :: WWW/HTTP
|
| 35 |
+
Project-URL: Homepage, https://github.com/fastapi/fastapi
|
| 36 |
+
Project-URL: Documentation, https://fastapi.tiangolo.com/
|
| 37 |
+
Project-URL: Repository, https://github.com/fastapi/fastapi
|
| 38 |
+
Project-URL: Issues, https://github.com/fastapi/fastapi/issues
|
| 39 |
+
Project-URL: Changelog, https://fastapi.tiangolo.com/release-notes/
|
| 40 |
+
Requires-Python: >=3.9
|
| 41 |
+
Requires-Dist: starlette<0.51.0,>=0.40.0
|
| 42 |
+
Requires-Dist: pydantic>=2.7.0
|
| 43 |
+
Requires-Dist: typing-extensions>=4.8.0
|
| 44 |
+
Requires-Dist: annotated-doc>=0.0.2
|
| 45 |
+
Provides-Extra: standard
|
| 46 |
+
Requires-Dist: fastapi-cli[standard]>=0.0.8; extra == "standard"
|
| 47 |
+
Requires-Dist: httpx<1.0.0,>=0.23.0; extra == "standard"
|
| 48 |
+
Requires-Dist: jinja2>=3.1.5; extra == "standard"
|
| 49 |
+
Requires-Dist: python-multipart>=0.0.18; extra == "standard"
|
| 50 |
+
Requires-Dist: email-validator>=2.0.0; extra == "standard"
|
| 51 |
+
Requires-Dist: uvicorn[standard]>=0.12.0; extra == "standard"
|
| 52 |
+
Requires-Dist: pydantic-settings>=2.0.0; extra == "standard"
|
| 53 |
+
Requires-Dist: pydantic-extra-types>=2.0.0; extra == "standard"
|
| 54 |
+
Provides-Extra: standard-no-fastapi-cloud-cli
|
| 55 |
+
Requires-Dist: fastapi-cli[standard-no-fastapi-cloud-cli]>=0.0.8; extra == "standard-no-fastapi-cloud-cli"
|
| 56 |
+
Requires-Dist: httpx<1.0.0,>=0.23.0; extra == "standard-no-fastapi-cloud-cli"
|
| 57 |
+
Requires-Dist: jinja2>=3.1.5; extra == "standard-no-fastapi-cloud-cli"
|
| 58 |
+
Requires-Dist: python-multipart>=0.0.18; extra == "standard-no-fastapi-cloud-cli"
|
| 59 |
+
Requires-Dist: email-validator>=2.0.0; extra == "standard-no-fastapi-cloud-cli"
|
| 60 |
+
Requires-Dist: uvicorn[standard]>=0.12.0; extra == "standard-no-fastapi-cloud-cli"
|
| 61 |
+
Requires-Dist: pydantic-settings>=2.0.0; extra == "standard-no-fastapi-cloud-cli"
|
| 62 |
+
Requires-Dist: pydantic-extra-types>=2.0.0; extra == "standard-no-fastapi-cloud-cli"
|
| 63 |
+
Provides-Extra: all
|
| 64 |
+
Requires-Dist: fastapi-cli[standard]>=0.0.8; extra == "all"
|
| 65 |
+
Requires-Dist: httpx<1.0.0,>=0.23.0; extra == "all"
|
| 66 |
+
Requires-Dist: jinja2>=3.1.5; extra == "all"
|
| 67 |
+
Requires-Dist: python-multipart>=0.0.18; extra == "all"
|
| 68 |
+
Requires-Dist: itsdangerous>=1.1.0; extra == "all"
|
| 69 |
+
Requires-Dist: pyyaml>=5.3.1; extra == "all"
|
| 70 |
+
Requires-Dist: ujson!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,>=4.0.1; extra == "all"
|
| 71 |
+
Requires-Dist: orjson>=3.2.1; extra == "all"
|
| 72 |
+
Requires-Dist: email-validator>=2.0.0; extra == "all"
|
| 73 |
+
Requires-Dist: uvicorn[standard]>=0.12.0; extra == "all"
|
| 74 |
+
Requires-Dist: pydantic-settings>=2.0.0; extra == "all"
|
| 75 |
+
Requires-Dist: pydantic-extra-types>=2.0.0; extra == "all"
|
| 76 |
+
Description-Content-Type: text/markdown
|
| 77 |
+
|
| 78 |
+
<p align="center">
|
| 79 |
+
<a href="https://fastapi.tiangolo.com"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a>
|
| 80 |
+
</p>
|
| 81 |
+
<p align="center">
|
| 82 |
+
<em>FastAPI framework, high performance, easy to learn, fast to code, ready for production</em>
|
| 83 |
+
</p>
|
| 84 |
+
<p align="center">
|
| 85 |
+
<a href="https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank">
|
| 86 |
+
<img src="https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test">
|
| 87 |
+
</a>
|
| 88 |
+
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi" target="_blank">
|
| 89 |
+
<img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt="Coverage">
|
| 90 |
+
</a>
|
| 91 |
+
<a href="https://pypi.org/project/fastapi" target="_blank">
|
| 92 |
+
<img src="https://img.shields.io/pypi/v/fastapi?color=%2334D058&label=pypi%20package" alt="Package version">
|
| 93 |
+
</a>
|
| 94 |
+
<a href="https://pypi.org/project/fastapi" target="_blank">
|
| 95 |
+
<img src="https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058" alt="Supported Python versions">
|
| 96 |
+
</a>
|
| 97 |
+
</p>
|
| 98 |
+
|
| 99 |
+
---
|
| 100 |
+
|
| 101 |
+
**Documentation**: <a href="https://fastapi.tiangolo.com" target="_blank">https://fastapi.tiangolo.com</a>
|
| 102 |
+
|
| 103 |
+
**Source Code**: <a href="https://github.com/fastapi/fastapi" target="_blank">https://github.com/fastapi/fastapi</a>
|
| 104 |
+
|
| 105 |
+
---
|
| 106 |
+
|
| 107 |
+
FastAPI is a modern, fast (high-performance), web framework for building APIs with Python based on standard Python type hints.
|
| 108 |
+
|
| 109 |
+
The key features are:
|
| 110 |
+
|
| 111 |
+
* **Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic). [One of the fastest Python frameworks available](#performance).
|
| 112 |
+
* **Fast to code**: Increase the speed to develop features by about 200% to 300%. *
|
| 113 |
+
* **Fewer bugs**: Reduce about 40% of human (developer) induced errors. *
|
| 114 |
+
* **Intuitive**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging.
|
| 115 |
+
* **Easy**: Designed to be easy to use and learn. Less time reading docs.
|
| 116 |
+
* **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
|
| 117 |
+
* **Robust**: Get production-ready code. With automatic interactive documentation.
|
| 118 |
+
* **Standards-based**: Based on (and fully compatible with) the open standards for APIs: <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a> (previously known as Swagger) and <a href="https://json-schema.org/" class="external-link" target="_blank">JSON Schema</a>.
|
| 119 |
+
|
| 120 |
+
<small>* estimation based on tests conducted by an internal development team, building production applications.</small>
|
| 121 |
+
|
| 122 |
+
## Sponsors
|
| 123 |
+
|
| 124 |
+
<!-- sponsors -->
|
| 125 |
+
### Keystone Sponsor
|
| 126 |
+
|
| 127 |
+
<a href="https://fastapicloud.com" target="_blank" title="FastAPI Cloud. By the same team behind FastAPI. You code. We Cloud."><img src="https://fastapi.tiangolo.com/img/sponsors/fastapicloud.png"></a>
|
| 128 |
+
|
| 129 |
+
### Gold and Silver Sponsors
|
| 130 |
+
|
| 131 |
+
<a href="https://blockbee.io?ref=fastapi" target="_blank" title="BlockBee Cryptocurrency Payment Gateway"><img src="https://fastapi.tiangolo.com/img/sponsors/blockbee.png"></a>
|
| 132 |
+
<a href="https://github.com/scalar/scalar/?utm_source=fastapi&utm_medium=website&utm_campaign=main-badge" target="_blank" title="Scalar: Beautiful Open-Source API References from Swagger/OpenAPI files"><img src="https://fastapi.tiangolo.com/img/sponsors/scalar.svg"></a>
|
| 133 |
+
<a href="https://www.propelauth.com/?utm_source=fastapi&utm_campaign=1223&utm_medium=mainbadge" target="_blank" title="Auth, user management and more for your B2B product"><img src="https://fastapi.tiangolo.com/img/sponsors/propelauth.png"></a>
|
| 134 |
+
<a href="https://zuplo.link/fastapi-gh" target="_blank" title="Zuplo: Deploy, Secure, Document, and Monetize your FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/zuplo.png"></a>
|
| 135 |
+
<a href="https://liblab.com?utm_source=fastapi" target="_blank" title="liblab - Generate SDKs from FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/liblab.png"></a>
|
| 136 |
+
<a href="https://docs.render.com/deploy-fastapi?utm_source=deploydoc&utm_medium=referral&utm_campaign=fastapi" target="_blank" title="Deploy & scale any full-stack web app on Render. Focus on building apps, not infra."><img src="https://fastapi.tiangolo.com/img/sponsors/render.svg"></a>
|
| 137 |
+
<a href="https://www.coderabbit.ai/?utm_source=fastapi&utm_medium=badge&utm_campaign=fastapi" target="_blank" title="Cut Code Review Time & Bugs in Half with CodeRabbit"><img src="https://fastapi.tiangolo.com/img/sponsors/coderabbit.png"></a>
|
| 138 |
+
<a href="https://subtotal.com/?utm_source=fastapi&utm_medium=sponsorship&utm_campaign=open-source" target="_blank" title="The Gold Standard in Retail Account Linking"><img src="https://fastapi.tiangolo.com/img/sponsors/subtotal.svg"></a>
|
| 139 |
+
<a href="https://docs.railway.com/guides/fastapi?utm_medium=integration&utm_source=docs&utm_campaign=fastapi" target="_blank" title="Deploy enterprise applications at startup speed"><img src="https://fastapi.tiangolo.com/img/sponsors/railway.png"></a>
|
| 140 |
+
<a href="https://serpapi.com/?utm_source=fastapi_website" target="_blank" title="SerpApi: Web Search API"><img src="https://fastapi.tiangolo.com/img/sponsors/serpapi.png"></a>
|
| 141 |
+
<a href="https://www.greptile.com/?utm_source=fastapi&utm_medium=sponsorship&utm_campaign=fastapi_sponsor_page" target="_blank" title="Greptile: The AI Code Reviewer"><img src="https://fastapi.tiangolo.com/img/sponsors/greptile.png"></a>
|
| 142 |
+
<a href="https://databento.com/?utm_source=fastapi&utm_medium=sponsor&utm_content=display" target="_blank" title="Pay as you go for market data"><img src="https://fastapi.tiangolo.com/img/sponsors/databento.svg"></a>
|
| 143 |
+
<a href="https://speakeasy.com/editor?utm_source=fastapi+repo&utm_medium=github+sponsorship" target="_blank" title="SDKs for your API | Speakeasy"><img src="https://fastapi.tiangolo.com/img/sponsors/speakeasy.png"></a>
|
| 144 |
+
<a href="https://www.svix.com/" target="_blank" title="Svix - Webhooks as a service"><img src="https://fastapi.tiangolo.com/img/sponsors/svix.svg"></a>
|
| 145 |
+
<a href="https://www.stainlessapi.com/?utm_source=fastapi&utm_medium=referral" target="_blank" title="Stainless | Generate best-in-class SDKs"><img src="https://fastapi.tiangolo.com/img/sponsors/stainless.png"></a>
|
| 146 |
+
<a href="https://www.permit.io/blog/implement-authorization-in-fastapi?utm_source=github&utm_medium=referral&utm_campaign=fastapi" target="_blank" title="Fine-Grained Authorization for FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/permit.png"></a>
|
| 147 |
+
<a href="https://www.interviewpal.com/?utm_source=fastapi&utm_medium=open-source&utm_campaign=dev-hiring" target="_blank" title="InterviewPal - AI Interview Coach for Engineers and Devs"><img src="https://fastapi.tiangolo.com/img/sponsors/interviewpal.png"></a>
|
| 148 |
+
<a href="https://dribia.com/en/" target="_blank" title="Dribia - Data Science within your reach"><img src="https://fastapi.tiangolo.com/img/sponsors/dribia.png"></a>
|
| 149 |
+
|
| 150 |
+
<!-- /sponsors -->
|
| 151 |
+
|
| 152 |
+
<a href="https://fastapi.tiangolo.com/fastapi-people/#sponsors" class="external-link" target="_blank">Other sponsors</a>
|
| 153 |
+
|
| 154 |
+
## Opinions
|
| 155 |
+
|
| 156 |
+
"_[...] I'm using **FastAPI** a ton these days. [...] I'm actually planning to use it for all of my team's **ML services at Microsoft**. Some of them are getting integrated into the core **Windows** product and some **Office** products._"
|
| 157 |
+
|
| 158 |
+
<div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26" target="_blank"><small>(ref)</small></a></div>
|
| 159 |
+
|
| 160 |
+
---
|
| 161 |
+
|
| 162 |
+
"_We adopted the **FastAPI** library to spawn a **REST** server that can be queried to obtain **predictions**. [for Ludwig]_"
|
| 163 |
+
|
| 164 |
+
<div style="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/" target="_blank"><small>(ref)</small></a></div>
|
| 165 |
+
|
| 166 |
+
---
|
| 167 |
+
|
| 168 |
+
"_**Netflix** is pleased to announce the open-source release of our **crisis management** orchestration framework: **Dispatch**! [built with **FastAPI**]_"
|
| 169 |
+
|
| 170 |
+
<div style="text-align: right; margin-right: 10%;">Kevin Glisson, Marc Vilanova, Forest Monsen - <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072" target="_blank"><small>(ref)</small></a></div>
|
| 171 |
+
|
| 172 |
+
---
|
| 173 |
+
|
| 174 |
+
"_I’m over the moon excited about **FastAPI**. It’s so fun!_"
|
| 175 |
+
|
| 176 |
+
<div style="text-align: right; margin-right: 10%;">Brian Okken - <strong><a href="https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855" target="_blank">Python Bytes</a> podcast host</strong> <a href="https://x.com/brianokken/status/1112220079972728832" target="_blank"><small>(ref)</small></a></div>
|
| 177 |
+
|
| 178 |
+
---
|
| 179 |
+
|
| 180 |
+
"_Honestly, what you've built looks super solid and polished. In many ways, it's what I wanted **Hug** to be - it's really inspiring to see someone build that._"
|
| 181 |
+
|
| 182 |
+
<div style="text-align: right; margin-right: 10%;">Timothy Crosley - <strong><a href="https://github.com/hugapi/hug" target="_blank">Hug</a> creator</strong> <a href="https://news.ycombinator.com/item?id=19455465" target="_blank"><small>(ref)</small></a></div>
|
| 183 |
+
|
| 184 |
+
---
|
| 185 |
+
|
| 186 |
+
"_If you're looking to learn one **modern framework** for building REST APIs, check out **FastAPI** [...] It's fast, easy to use and easy to learn [...]_"
|
| 187 |
+
|
| 188 |
+
"_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_"
|
| 189 |
+
|
| 190 |
+
<div style="text-align: right; margin-right: 10%;">Ines Montani - Matthew Honnibal - <strong><a href="https://explosion.ai" target="_blank">Explosion AI</a> founders - <a href="https://spacy.io" target="_blank">spaCy</a> creators</strong> <a href="https://x.com/_inesmontani/status/1144173225322143744" target="_blank"><small>(ref)</small></a> - <a href="https://x.com/honnibal/status/1144031421859655680" target="_blank"><small>(ref)</small></a></div>
|
| 191 |
+
|
| 192 |
+
---
|
| 193 |
+
|
| 194 |
+
"_If anyone is looking to build a production Python API, I would highly recommend **FastAPI**. It is **beautifully designed**, **simple to use** and **highly scalable**, it has become a **key component** in our API first development strategy and is driving many automations and services such as our Virtual TAC Engineer._"
|
| 195 |
+
|
| 196 |
+
<div style="text-align: right; margin-right: 10%;">Deon Pillsbury - <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/" target="_blank"><small>(ref)</small></a></div>
|
| 197 |
+
|
| 198 |
+
---
|
| 199 |
+
|
| 200 |
+
## FastAPI mini documentary
|
| 201 |
+
|
| 202 |
+
There's a <a href="https://www.youtube.com/watch?v=mpR8ngthqiE" class="external-link" target="_blank">FastAPI mini documentary</a> released at the end of 2025, you can watch it online:
|
| 203 |
+
|
| 204 |
+
<a href="https://www.youtube.com/watch?v=mpR8ngthqiE" target="_blank"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
|
| 205 |
+
|
| 206 |
+
## **Typer**, the FastAPI of CLIs
|
| 207 |
+
|
| 208 |
+
<a href="https://typer.tiangolo.com" target="_blank"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style="width: 20%;"></a>
|
| 209 |
+
|
| 210 |
+
If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be used in the terminal instead of a web API, check out <a href="https://typer.tiangolo.com/" class="external-link" target="_blank">**Typer**</a>.
|
| 211 |
+
|
| 212 |
+
**Typer** is FastAPI's little sibling. And it's intended to be the **FastAPI of CLIs**. ⌨️ 🚀
|
| 213 |
+
|
| 214 |
+
## Requirements
|
| 215 |
+
|
| 216 |
+
FastAPI stands on the shoulders of giants:
|
| 217 |
+
|
| 218 |
+
* <a href="https://www.starlette.dev/" class="external-link" target="_blank">Starlette</a> for the web parts.
|
| 219 |
+
* <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> for the data parts.
|
| 220 |
+
|
| 221 |
+
## Installation
|
| 222 |
+
|
| 223 |
+
Create and activate a <a href="https://fastapi.tiangolo.com/virtual-environments/" class="external-link" target="_blank">virtual environment</a> and then install FastAPI:
|
| 224 |
+
|
| 225 |
+
<div class="termy">
|
| 226 |
+
|
| 227 |
+
```console
|
| 228 |
+
$ pip install "fastapi[standard]"
|
| 229 |
+
|
| 230 |
+
---> 100%
|
| 231 |
+
```
|
| 232 |
+
|
| 233 |
+
</div>
|
| 234 |
+
|
| 235 |
+
**Note**: Make sure you put `"fastapi[standard]"` in quotes to ensure it works in all terminals.
|
| 236 |
+
|
| 237 |
+
## Example
|
| 238 |
+
|
| 239 |
+
### Create it
|
| 240 |
+
|
| 241 |
+
Create a file `main.py` with:
|
| 242 |
+
|
| 243 |
+
```Python
|
| 244 |
+
from fastapi import FastAPI
|
| 245 |
+
|
| 246 |
+
app = FastAPI()
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
@app.get("/")
|
| 250 |
+
def read_root():
|
| 251 |
+
return {"Hello": "World"}
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
@app.get("/items/{item_id}")
|
| 255 |
+
def read_item(item_id: int, q: str | None = None):
|
| 256 |
+
return {"item_id": item_id, "q": q}
|
| 257 |
+
```
|
| 258 |
+
|
| 259 |
+
<details markdown="1">
|
| 260 |
+
<summary>Or use <code>async def</code>...</summary>
|
| 261 |
+
|
| 262 |
+
If your code uses `async` / `await`, use `async def`:
|
| 263 |
+
|
| 264 |
+
```Python hl_lines="7 12"
|
| 265 |
+
from fastapi import FastAPI
|
| 266 |
+
|
| 267 |
+
app = FastAPI()
|
| 268 |
+
|
| 269 |
+
|
| 270 |
+
@app.get("/")
|
| 271 |
+
async def read_root():
|
| 272 |
+
return {"Hello": "World"}
|
| 273 |
+
|
| 274 |
+
|
| 275 |
+
@app.get("/items/{item_id}")
|
| 276 |
+
async def read_item(item_id: int, q: str | None = None):
|
| 277 |
+
return {"item_id": item_id, "q": q}
|
| 278 |
+
```
|
| 279 |
+
|
| 280 |
+
**Note**:
|
| 281 |
+
|
| 282 |
+
If you don't know, check the _"In a hurry?"_ section about <a href="https://fastapi.tiangolo.com/async/#in-a-hurry" target="_blank">`async` and `await` in the docs</a>.
|
| 283 |
+
|
| 284 |
+
</details>
|
| 285 |
+
|
| 286 |
+
### Run it
|
| 287 |
+
|
| 288 |
+
Run the server with:
|
| 289 |
+
|
| 290 |
+
<div class="termy">
|
| 291 |
+
|
| 292 |
+
```console
|
| 293 |
+
$ fastapi dev main.py
|
| 294 |
+
|
| 295 |
+
╭────────── FastAPI CLI - Development mode ───────────╮
|
| 296 |
+
│ │
|
| 297 |
+
│ Serving at: http://127.0.0.1:8000 │
|
| 298 |
+
│ │
|
| 299 |
+
│ API docs: http://127.0.0.1:8000/docs │
|
| 300 |
+
│ │
|
| 301 |
+
│ Running in development mode, for production use: │
|
| 302 |
+
│ │
|
| 303 |
+
│ fastapi run │
|
| 304 |
+
│ │
|
| 305 |
+
╰─────────────────────────────────────────────────────╯
|
| 306 |
+
|
| 307 |
+
INFO: Will watch for changes in these directories: ['/home/user/code/awesomeapp']
|
| 308 |
+
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
|
| 309 |
+
INFO: Started reloader process [2248755] using WatchFiles
|
| 310 |
+
INFO: Started server process [2248757]
|
| 311 |
+
INFO: Waiting for application startup.
|
| 312 |
+
INFO: Application startup complete.
|
| 313 |
+
```
|
| 314 |
+
|
| 315 |
+
</div>
|
| 316 |
+
|
| 317 |
+
<details markdown="1">
|
| 318 |
+
<summary>About the command <code>fastapi dev main.py</code>...</summary>
|
| 319 |
+
|
| 320 |
+
The command `fastapi dev` reads your `main.py` file, detects the **FastAPI** app in it, and starts a server using <a href="https://www.uvicorn.dev" class="external-link" target="_blank">Uvicorn</a>.
|
| 321 |
+
|
| 322 |
+
By default, `fastapi dev` will start with auto-reload enabled for local development.
|
| 323 |
+
|
| 324 |
+
You can read more about it in the <a href="https://fastapi.tiangolo.com/fastapi-cli/" target="_blank">FastAPI CLI docs</a>.
|
| 325 |
+
|
| 326 |
+
</details>
|
| 327 |
+
|
| 328 |
+
### Check it
|
| 329 |
+
|
| 330 |
+
Open your browser at <a href="http://127.0.0.1:8000/items/5?q=somequery" class="external-link" target="_blank">http://127.0.0.1:8000/items/5?q=somequery</a>.
|
| 331 |
+
|
| 332 |
+
You will see the JSON response as:
|
| 333 |
+
|
| 334 |
+
```JSON
|
| 335 |
+
{"item_id": 5, "q": "somequery"}
|
| 336 |
+
```
|
| 337 |
+
|
| 338 |
+
You already created an API that:
|
| 339 |
+
|
| 340 |
+
* Receives HTTP requests in the _paths_ `/` and `/items/{item_id}`.
|
| 341 |
+
* Both _paths_ take `GET` <em>operations</em> (also known as HTTP _methods_).
|
| 342 |
+
* The _path_ `/items/{item_id}` has a _path parameter_ `item_id` that should be an `int`.
|
| 343 |
+
* The _path_ `/items/{item_id}` has an optional `str` _query parameter_ `q`.
|
| 344 |
+
|
| 345 |
+
### Interactive API docs
|
| 346 |
+
|
| 347 |
+
Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
|
| 348 |
+
|
| 349 |
+
You will see the automatic interactive API documentation (provided by <a href="https://github.com/swagger-api/swagger-ui" class="external-link" target="_blank">Swagger UI</a>):
|
| 350 |
+
|
| 351 |
+

|
| 352 |
+
|
| 353 |
+
### Alternative API docs
|
| 354 |
+
|
| 355 |
+
And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
|
| 356 |
+
|
| 357 |
+
You will see the alternative automatic documentation (provided by <a href="https://github.com/Rebilly/ReDoc" class="external-link" target="_blank">ReDoc</a>):
|
| 358 |
+
|
| 359 |
+

|
| 360 |
+
|
| 361 |
+
## Example upgrade
|
| 362 |
+
|
| 363 |
+
Now modify the file `main.py` to receive a body from a `PUT` request.
|
| 364 |
+
|
| 365 |
+
Declare the body using standard Python types, thanks to Pydantic.
|
| 366 |
+
|
| 367 |
+
```Python hl_lines="2 7-10 23-25"
|
| 368 |
+
from fastapi import FastAPI
|
| 369 |
+
from pydantic import BaseModel
|
| 370 |
+
|
| 371 |
+
app = FastAPI()
|
| 372 |
+
|
| 373 |
+
|
| 374 |
+
class Item(BaseModel):
|
| 375 |
+
name: str
|
| 376 |
+
price: float
|
| 377 |
+
is_offer: bool | None = None
|
| 378 |
+
|
| 379 |
+
|
| 380 |
+
@app.get("/")
|
| 381 |
+
def read_root():
|
| 382 |
+
return {"Hello": "World"}
|
| 383 |
+
|
| 384 |
+
|
| 385 |
+
@app.get("/items/{item_id}")
|
| 386 |
+
def read_item(item_id: int, q: str | None = None):
|
| 387 |
+
return {"item_id": item_id, "q": q}
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
@app.put("/items/{item_id}")
|
| 391 |
+
def update_item(item_id: int, item: Item):
|
| 392 |
+
return {"item_name": item.name, "item_id": item_id}
|
| 393 |
+
```
|
| 394 |
+
|
| 395 |
+
The `fastapi dev` server should reload automatically.
|
| 396 |
+
|
| 397 |
+
### Interactive API docs upgrade
|
| 398 |
+
|
| 399 |
+
Now go to <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
|
| 400 |
+
|
| 401 |
+
* The interactive API documentation will be automatically updated, including the new body:
|
| 402 |
+
|
| 403 |
+

|
| 404 |
+
|
| 405 |
+
* Click on the button "Try it out", it allows you to fill the parameters and directly interact with the API:
|
| 406 |
+
|
| 407 |
+

|
| 408 |
+
|
| 409 |
+
* Then click on the "Execute" button, the user interface will communicate with your API, send the parameters, get the results and show them on the screen:
|
| 410 |
+
|
| 411 |
+

|
| 412 |
+
|
| 413 |
+
### Alternative API docs upgrade
|
| 414 |
+
|
| 415 |
+
And now, go to <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>.
|
| 416 |
+
|
| 417 |
+
* The alternative documentation will also reflect the new query parameter and body:
|
| 418 |
+
|
| 419 |
+

|
| 420 |
+
|
| 421 |
+
### Recap
|
| 422 |
+
|
| 423 |
+
In summary, you declare **once** the types of parameters, body, etc. as function parameters.
|
| 424 |
+
|
| 425 |
+
You do that with standard modern Python types.
|
| 426 |
+
|
| 427 |
+
You don't have to learn a new syntax, the methods or classes of a specific library, etc.
|
| 428 |
+
|
| 429 |
+
Just standard **Python**.
|
| 430 |
+
|
| 431 |
+
For example, for an `int`:
|
| 432 |
+
|
| 433 |
+
```Python
|
| 434 |
+
item_id: int
|
| 435 |
+
```
|
| 436 |
+
|
| 437 |
+
or for a more complex `Item` model:
|
| 438 |
+
|
| 439 |
+
```Python
|
| 440 |
+
item: Item
|
| 441 |
+
```
|
| 442 |
+
|
| 443 |
+
...and with that single declaration you get:
|
| 444 |
+
|
| 445 |
+
* Editor support, including:
|
| 446 |
+
* Completion.
|
| 447 |
+
* Type checks.
|
| 448 |
+
* Validation of data:
|
| 449 |
+
* Automatic and clear errors when the data is invalid.
|
| 450 |
+
* Validation even for deeply nested JSON objects.
|
| 451 |
+
* <abbr title="also known as: serialization, parsing, marshalling">Conversion</abbr> of input data: coming from the network to Python data and types. Reading from:
|
| 452 |
+
* JSON.
|
| 453 |
+
* Path parameters.
|
| 454 |
+
* Query parameters.
|
| 455 |
+
* Cookies.
|
| 456 |
+
* Headers.
|
| 457 |
+
* Forms.
|
| 458 |
+
* Files.
|
| 459 |
+
* <abbr title="also known as: serialization, parsing, marshalling">Conversion</abbr> of output data: converting from Python data and types to network data (as JSON):
|
| 460 |
+
* Convert Python types (`str`, `int`, `float`, `bool`, `list`, etc).
|
| 461 |
+
* `datetime` objects.
|
| 462 |
+
* `UUID` objects.
|
| 463 |
+
* Database models.
|
| 464 |
+
* ...and many more.
|
| 465 |
+
* Automatic interactive API documentation, including 2 alternative user interfaces:
|
| 466 |
+
* Swagger UI.
|
| 467 |
+
* ReDoc.
|
| 468 |
+
|
| 469 |
+
---
|
| 470 |
+
|
| 471 |
+
Coming back to the previous code example, **FastAPI** will:
|
| 472 |
+
|
| 473 |
+
* Validate that there is an `item_id` in the path for `GET` and `PUT` requests.
|
| 474 |
+
* Validate that the `item_id` is of type `int` for `GET` and `PUT` requests.
|
| 475 |
+
* If it is not, the client will see a useful, clear error.
|
| 476 |
+
* Check if there is an optional query parameter named `q` (as in `http://127.0.0.1:8000/items/foo?q=somequery`) for `GET` requests.
|
| 477 |
+
* As the `q` parameter is declared with `= None`, it is optional.
|
| 478 |
+
* Without the `None` it would be required (as is the body in the case with `PUT`).
|
| 479 |
+
* For `PUT` requests to `/items/{item_id}`, read the body as JSON:
|
| 480 |
+
* Check that it has a required attribute `name` that should be a `str`.
|
| 481 |
+
* Check that it has a required attribute `price` that has to be a `float`.
|
| 482 |
+
* Check that it has an optional attribute `is_offer`, that should be a `bool`, if present.
|
| 483 |
+
* All this would also work for deeply nested JSON objects.
|
| 484 |
+
* Convert from and to JSON automatically.
|
| 485 |
+
* Document everything with OpenAPI, that can be used by:
|
| 486 |
+
* Interactive documentation systems.
|
| 487 |
+
* Automatic client code generation systems, for many languages.
|
| 488 |
+
* Provide 2 interactive documentation web interfaces directly.
|
| 489 |
+
|
| 490 |
+
---
|
| 491 |
+
|
| 492 |
+
We just scratched the surface, but you already get the idea of how it all works.
|
| 493 |
+
|
| 494 |
+
Try changing the line with:
|
| 495 |
+
|
| 496 |
+
```Python
|
| 497 |
+
return {"item_name": item.name, "item_id": item_id}
|
| 498 |
+
```
|
| 499 |
+
|
| 500 |
+
...from:
|
| 501 |
+
|
| 502 |
+
```Python
|
| 503 |
+
... "item_name": item.name ...
|
| 504 |
+
```
|
| 505 |
+
|
| 506 |
+
...to:
|
| 507 |
+
|
| 508 |
+
```Python
|
| 509 |
+
... "item_price": item.price ...
|
| 510 |
+
```
|
| 511 |
+
|
| 512 |
+
...and see how your editor will auto-complete the attributes and know their types:
|
| 513 |
+
|
| 514 |
+

|
| 515 |
+
|
| 516 |
+
For a more complete example including more features, see the <a href="https://fastapi.tiangolo.com/tutorial/">Tutorial - User Guide</a>.
|
| 517 |
+
|
| 518 |
+
**Spoiler alert**: the tutorial - user guide includes:
|
| 519 |
+
|
| 520 |
+
* Declaration of **parameters** from other different places as: **headers**, **cookies**, **form fields** and **files**.
|
| 521 |
+
* How to set **validation constraints** as `maximum_length` or `regex`.
|
| 522 |
+
* A very powerful and easy to use **<abbr title="also known as components, resources, providers, services, injectables">Dependency Injection</abbr>** system.
|
| 523 |
+
* Security and authentication, including support for **OAuth2** with **JWT tokens** and **HTTP Basic** auth.
|
| 524 |
+
* More advanced (but equally easy) techniques for declaring **deeply nested JSON models** (thanks to Pydantic).
|
| 525 |
+
* **GraphQL** integration with <a href="https://strawberry.rocks" class="external-link" target="_blank">Strawberry</a> and other libraries.
|
| 526 |
+
* Many extra features (thanks to Starlette) as:
|
| 527 |
+
* **WebSockets**
|
| 528 |
+
* extremely easy tests based on HTTPX and `pytest`
|
| 529 |
+
* **CORS**
|
| 530 |
+
* **Cookie Sessions**
|
| 531 |
+
* ...and more.
|
| 532 |
+
|
| 533 |
+
### Deploy your app (optional)
|
| 534 |
+
|
| 535 |
+
You can optionally deploy your FastAPI app to <a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>, go and join the waiting list if you haven't. 🚀
|
| 536 |
+
|
| 537 |
+
If you already have a **FastAPI Cloud** account (we invited you from the waiting list 😉), you can deploy your application with one command.
|
| 538 |
+
|
| 539 |
+
Before deploying, make sure you are logged in:
|
| 540 |
+
|
| 541 |
+
<div class="termy">
|
| 542 |
+
|
| 543 |
+
```console
|
| 544 |
+
$ fastapi login
|
| 545 |
+
|
| 546 |
+
You are logged in to FastAPI Cloud 🚀
|
| 547 |
+
```
|
| 548 |
+
|
| 549 |
+
</div>
|
| 550 |
+
|
| 551 |
+
Then deploy your app:
|
| 552 |
+
|
| 553 |
+
<div class="termy">
|
| 554 |
+
|
| 555 |
+
```console
|
| 556 |
+
$ fastapi deploy
|
| 557 |
+
|
| 558 |
+
Deploying to FastAPI Cloud...
|
| 559 |
+
|
| 560 |
+
✅ Deployment successful!
|
| 561 |
+
|
| 562 |
+
🐔 Ready the chicken! Your app is ready at https://myapp.fastapicloud.dev
|
| 563 |
+
```
|
| 564 |
+
|
| 565 |
+
</div>
|
| 566 |
+
|
| 567 |
+
That's it! Now you can access your app at that URL. ✨
|
| 568 |
+
|
| 569 |
+
#### About FastAPI Cloud
|
| 570 |
+
|
| 571 |
+
**<a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>** is built by the same author and team behind **FastAPI**.
|
| 572 |
+
|
| 573 |
+
It streamlines the process of **building**, **deploying**, and **accessing** an API with minimal effort.
|
| 574 |
+
|
| 575 |
+
It brings the same **developer experience** of building apps with FastAPI to **deploying** them to the cloud. 🎉
|
| 576 |
+
|
| 577 |
+
FastAPI Cloud is the primary sponsor and funding provider for the *FastAPI and friends* open source projects. ✨
|
| 578 |
+
|
| 579 |
+
#### Deploy to other cloud providers
|
| 580 |
+
|
| 581 |
+
FastAPI is open source and based on standards. You can deploy FastAPI apps to any cloud provider you choose.
|
| 582 |
+
|
| 583 |
+
Follow your cloud provider's guides to deploy FastAPI apps with them. 🤓
|
| 584 |
+
|
| 585 |
+
## Performance
|
| 586 |
+
|
| 587 |
+
Independent TechEmpower benchmarks show **FastAPI** applications running under Uvicorn as <a href="https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7" class="external-link" target="_blank">one of the fastest Python frameworks available</a>, only below Starlette and Uvicorn themselves (used internally by FastAPI). (*)
|
| 588 |
+
|
| 589 |
+
To understand more about it, see the section <a href="https://fastapi.tiangolo.com/benchmarks/" class="internal-link" target="_blank">Benchmarks</a>.
|
| 590 |
+
|
| 591 |
+
## Dependencies
|
| 592 |
+
|
| 593 |
+
FastAPI depends on Pydantic and Starlette.
|
| 594 |
+
|
| 595 |
+
### `standard` Dependencies
|
| 596 |
+
|
| 597 |
+
When you install FastAPI with `pip install "fastapi[standard]"` it comes with the `standard` group of optional dependencies:
|
| 598 |
+
|
| 599 |
+
Used by Pydantic:
|
| 600 |
+
|
| 601 |
+
* <a href="https://github.com/JoshData/python-email-validator" target="_blank"><code>email-validator</code></a> - for email validation.
|
| 602 |
+
|
| 603 |
+
Used by Starlette:
|
| 604 |
+
|
| 605 |
+
* <a href="https://www.python-httpx.org" target="_blank"><code>httpx</code></a> - Required if you want to use the `TestClient`.
|
| 606 |
+
* <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - Required if you want to use the default template configuration.
|
| 607 |
+
* <a href="https://github.com/Kludex/python-multipart" target="_blank"><code>python-multipart</code></a> - Required if you want to support form <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>, with `request.form()`.
|
| 608 |
+
|
| 609 |
+
Used by FastAPI:
|
| 610 |
+
|
| 611 |
+
* <a href="https://www.uvicorn.dev" target="_blank"><code>uvicorn</code></a> - for the server that loads and serves your application. This includes `uvicorn[standard]`, which includes some dependencies (e.g. `uvloop`) needed for high performance serving.
|
| 612 |
+
* `fastapi-cli[standard]` - to provide the `fastapi` command.
|
| 613 |
+
* This includes `fastapi-cloud-cli`, which allows you to deploy your FastAPI application to <a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>.
|
| 614 |
+
|
| 615 |
+
### Without `standard` Dependencies
|
| 616 |
+
|
| 617 |
+
If you don't want to include the `standard` optional dependencies, you can install with `pip install fastapi` instead of `pip install "fastapi[standard]"`.
|
| 618 |
+
|
| 619 |
+
### Without `fastapi-cloud-cli`
|
| 620 |
+
|
| 621 |
+
If you want to install FastAPI with the standard dependencies but without the `fastapi-cloud-cli`, you can install with `pip install "fastapi[standard-no-fastapi-cloud-cli]"`.
|
| 622 |
+
|
| 623 |
+
### Additional Optional Dependencies
|
| 624 |
+
|
| 625 |
+
There are some additional dependencies you might want to install.
|
| 626 |
+
|
| 627 |
+
Additional optional Pydantic dependencies:
|
| 628 |
+
|
| 629 |
+
* <a href="https://docs.pydantic.dev/latest/usage/pydantic_settings/" target="_blank"><code>pydantic-settings</code></a> - for settings management.
|
| 630 |
+
* <a href="https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/" target="_blank"><code>pydantic-extra-types</code></a> - for extra types to be used with Pydantic.
|
| 631 |
+
|
| 632 |
+
Additional optional FastAPI dependencies:
|
| 633 |
+
|
| 634 |
+
* <a href="https://github.com/ijl/orjson" target="_blank"><code>orjson</code></a> - Required if you want to use `ORJSONResponse`.
|
| 635 |
+
* <a href="https://github.com/esnme/ultrajson" target="_blank"><code>ujson</code></a> - Required if you want to use `UJSONResponse`.
|
| 636 |
+
|
| 637 |
+
## License
|
| 638 |
+
|
| 639 |
+
This project is licensed under the terms of the MIT license.
|
.cache/pip/http-v2/2/6/4/1/7/264179aeab1d8942e5f72419f2c39e8a5577779f5155b081e3ad0fd8
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/2/6/4/1/7/264179aeab1d8942e5f72419f2c39e8a5577779f5155b081e3ad0fd8.body
ADDED
|
Binary file (2.49 kB). View file
|
|
|
.cache/pip/http-v2/2/7/7/8/7/277873b37b2358d20641cc2f5b361df0315b7f461701720c2d25eb6c
ADDED
|
Binary file (1.13 kB). View file
|
|
|
.cache/pip/http-v2/2/9/8/b/6/298b673430df8f0a35ee4db6f607ebf574ee261ade83cef6af0b4bbc
ADDED
|
Binary file (1.17 kB). View file
|
|
|
.cache/pip/http-v2/2/9/8/b/6/298b673430df8f0a35ee4db6f607ebf574ee261ade83cef6af0b4bbc.body
ADDED
|
@@ -0,0 +1,586 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: ruff
|
| 3 |
+
Version: 0.15.0
|
| 4 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 5 |
+
Classifier: Environment :: Console
|
| 6 |
+
Classifier: Intended Audience :: Developers
|
| 7 |
+
Classifier: License :: OSI Approved :: MIT License
|
| 8 |
+
Classifier: Operating System :: OS Independent
|
| 9 |
+
Classifier: Programming Language :: Python
|
| 10 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 11 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 12 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 13 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 14 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 15 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 16 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 17 |
+
Classifier: Programming Language :: Python :: 3.14
|
| 18 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 19 |
+
Classifier: Programming Language :: Rust
|
| 20 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
| 21 |
+
Classifier: Topic :: Software Development :: Quality Assurance
|
| 22 |
+
License-File: LICENSE
|
| 23 |
+
Summary: An extremely fast Python linter and code formatter, written in Rust.
|
| 24 |
+
Keywords: automation,flake8,pycodestyle,pyflakes,pylint,clippy
|
| 25 |
+
Home-Page: https://docs.astral.sh/ruff
|
| 26 |
+
Author-email: "Astral Software Inc." <hey@astral.sh>
|
| 27 |
+
Requires-Python: >=3.7
|
| 28 |
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
| 29 |
+
Project-URL: Changelog, https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md
|
| 30 |
+
Project-URL: Documentation, https://docs.astral.sh/ruff/
|
| 31 |
+
Project-URL: Repository, https://github.com/astral-sh/ruff
|
| 32 |
+
|
| 33 |
+
<!-- Begin section: Overview -->
|
| 34 |
+
|
| 35 |
+
# Ruff
|
| 36 |
+
|
| 37 |
+
[](https://github.com/astral-sh/ruff)
|
| 38 |
+
[](https://pypi.python.org/pypi/ruff)
|
| 39 |
+
[](https://github.com/astral-sh/ruff/blob/main/LICENSE)
|
| 40 |
+
[](https://pypi.python.org/pypi/ruff)
|
| 41 |
+
[](https://github.com/astral-sh/ruff/actions)
|
| 42 |
+
[](https://discord.com/invite/astral-sh)
|
| 43 |
+
|
| 44 |
+
[**Docs**](https://docs.astral.sh/ruff/) | [**Playground**](https://play.ruff.rs/)
|
| 45 |
+
|
| 46 |
+
An extremely fast Python linter and code formatter, written in Rust.
|
| 47 |
+
|
| 48 |
+
<p align="center">
|
| 49 |
+
<img alt="Shows a bar chart with benchmark results." src="https://user-images.githubusercontent.com/1309177/232603516-4fb4892d-585c-4b20-b810-3db9161831e4.svg">
|
| 50 |
+
</p>
|
| 51 |
+
|
| 52 |
+
<p align="center">
|
| 53 |
+
<i>Linting the CPython codebase from scratch.</i>
|
| 54 |
+
</p>
|
| 55 |
+
|
| 56 |
+
- ⚡️ 10-100x faster than existing linters (like Flake8) and formatters (like Black)
|
| 57 |
+
- 🐍 Installable via `pip`
|
| 58 |
+
- 🛠️ `pyproject.toml` support
|
| 59 |
+
- 🤝 Python 3.14 compatibility
|
| 60 |
+
- ⚖️ Drop-in parity with [Flake8](https://docs.astral.sh/ruff/faq/#how-does-ruffs-linter-compare-to-flake8), isort, and [Black](https://docs.astral.sh/ruff/faq/#how-does-ruffs-formatter-compare-to-black)
|
| 61 |
+
- 📦 Built-in caching, to avoid re-analyzing unchanged files
|
| 62 |
+
- 🔧 Fix support, for automatic error correction (e.g., automatically remove unused imports)
|
| 63 |
+
- 📏 Over [800 built-in rules](https://docs.astral.sh/ruff/rules/), with native re-implementations
|
| 64 |
+
of popular Flake8 plugins, like flake8-bugbear
|
| 65 |
+
- ⌨️ First-party [editor integrations](https://docs.astral.sh/ruff/editors) for [VS Code](https://github.com/astral-sh/ruff-vscode) and [more](https://docs.astral.sh/ruff/editors/setup)
|
| 66 |
+
- 🌎 Monorepo-friendly, with [hierarchical and cascading configuration](https://docs.astral.sh/ruff/configuration/#config-file-discovery)
|
| 67 |
+
|
| 68 |
+
Ruff aims to be orders of magnitude faster than alternative tools while integrating more
|
| 69 |
+
functionality behind a single, common interface.
|
| 70 |
+
|
| 71 |
+
Ruff can be used to replace [Flake8](https://pypi.org/project/flake8/) (plus dozens of plugins),
|
| 72 |
+
[Black](https://github.com/psf/black), [isort](https://pypi.org/project/isort/),
|
| 73 |
+
[pydocstyle](https://pypi.org/project/pydocstyle/), [pyupgrade](https://pypi.org/project/pyupgrade/),
|
| 74 |
+
[autoflake](https://pypi.org/project/autoflake/), and more, all while executing tens or hundreds of
|
| 75 |
+
times faster than any individual tool.
|
| 76 |
+
|
| 77 |
+
Ruff is extremely actively developed and used in major open-source projects like:
|
| 78 |
+
|
| 79 |
+
- [Apache Airflow](https://github.com/apache/airflow)
|
| 80 |
+
- [Apache Superset](https://github.com/apache/superset)
|
| 81 |
+
- [FastAPI](https://github.com/tiangolo/fastapi)
|
| 82 |
+
- [Hugging Face](https://github.com/huggingface/transformers)
|
| 83 |
+
- [Pandas](https://github.com/pandas-dev/pandas)
|
| 84 |
+
- [SciPy](https://github.com/scipy/scipy)
|
| 85 |
+
|
| 86 |
+
...and [many more](#whos-using-ruff).
|
| 87 |
+
|
| 88 |
+
Ruff is backed by [Astral](https://astral.sh), the creators of
|
| 89 |
+
[uv](https://github.com/astral-sh/uv) and [ty](https://github.com/astral-sh/ty).
|
| 90 |
+
|
| 91 |
+
Read the [launch
|
| 92 |
+
post](https://astral.sh/blog/announcing-astral-the-company-behind-ruff), or the
|
| 93 |
+
original [project
|
| 94 |
+
announcement](https://notes.crmarsh.com/python-tooling-could-be-much-much-faster).
|
| 95 |
+
|
| 96 |
+
## Testimonials
|
| 97 |
+
|
| 98 |
+
[**Sebastián Ramírez**](https://twitter.com/tiangolo/status/1591912354882764802), creator
|
| 99 |
+
of [FastAPI](https://github.com/tiangolo/fastapi):
|
| 100 |
+
|
| 101 |
+
> Ruff is so fast that sometimes I add an intentional bug in the code just to confirm it's actually
|
| 102 |
+
> running and checking the code.
|
| 103 |
+
|
| 104 |
+
[**Nick Schrock**](https://twitter.com/schrockn/status/1612615862904827904), founder of [Elementl](https://www.elementl.com/),
|
| 105 |
+
co-creator of [GraphQL](https://graphql.org/):
|
| 106 |
+
|
| 107 |
+
> Why is Ruff a gamechanger? Primarily because it is nearly 1000x faster. Literally. Not a typo. On
|
| 108 |
+
> our largest module (dagster itself, 250k LOC) pylint takes about 2.5 minutes, parallelized across 4
|
| 109 |
+
> cores on my M1. Running ruff against our _entire_ codebase takes .4 seconds.
|
| 110 |
+
|
| 111 |
+
[**Bryan Van de Ven**](https://github.com/bokeh/bokeh/pull/12605), co-creator
|
| 112 |
+
of [Bokeh](https://github.com/bokeh/bokeh/), original author
|
| 113 |
+
of [Conda](https://docs.conda.io/en/latest/):
|
| 114 |
+
|
| 115 |
+
> Ruff is ~150-200x faster than flake8 on my machine, scanning the whole repo takes ~0.2s instead of
|
| 116 |
+
> ~20s. This is an enormous quality of life improvement for local dev. It's fast enough that I added
|
| 117 |
+
> it as an actual commit hook, which is terrific.
|
| 118 |
+
|
| 119 |
+
[**Timothy Crosley**](https://twitter.com/timothycrosley/status/1606420868514877440),
|
| 120 |
+
creator of [isort](https://github.com/PyCQA/isort):
|
| 121 |
+
|
| 122 |
+
> Just switched my first project to Ruff. Only one downside so far: it's so fast I couldn't believe
|
| 123 |
+
> it was working till I intentionally introduced some errors.
|
| 124 |
+
|
| 125 |
+
[**Tim Abbott**](https://github.com/zulip/zulip/pull/23431#issuecomment-1302557034), lead developer of [Zulip](https://github.com/zulip/zulip) (also [here](https://github.com/astral-sh/ruff/issues/465#issuecomment-1317400028)):
|
| 126 |
+
|
| 127 |
+
> This is just ridiculously fast... `ruff` is amazing.
|
| 128 |
+
|
| 129 |
+
<!-- End section: Overview -->
|
| 130 |
+
|
| 131 |
+
## Table of Contents
|
| 132 |
+
|
| 133 |
+
For more, see the [documentation](https://docs.astral.sh/ruff/).
|
| 134 |
+
|
| 135 |
+
1. [Getting Started](#getting-started)
|
| 136 |
+
1. [Configuration](#configuration)
|
| 137 |
+
1. [Rules](#rules)
|
| 138 |
+
1. [Contributing](#contributing)
|
| 139 |
+
1. [Support](#support)
|
| 140 |
+
1. [Acknowledgements](#acknowledgements)
|
| 141 |
+
1. [Who's Using Ruff?](#whos-using-ruff)
|
| 142 |
+
1. [License](#license)
|
| 143 |
+
|
| 144 |
+
## Getting Started<a id="getting-started"></a>
|
| 145 |
+
|
| 146 |
+
For more, see the [documentation](https://docs.astral.sh/ruff/).
|
| 147 |
+
|
| 148 |
+
### Installation
|
| 149 |
+
|
| 150 |
+
Ruff is available as [`ruff`](https://pypi.org/project/ruff/) on PyPI.
|
| 151 |
+
|
| 152 |
+
Invoke Ruff directly with [`uvx`](https://docs.astral.sh/uv/):
|
| 153 |
+
|
| 154 |
+
```shell
|
| 155 |
+
uvx ruff check # Lint all files in the current directory.
|
| 156 |
+
uvx ruff format # Format all files in the current directory.
|
| 157 |
+
```
|
| 158 |
+
|
| 159 |
+
Or install Ruff with `uv` (recommended), `pip`, or `pipx`:
|
| 160 |
+
|
| 161 |
+
```shell
|
| 162 |
+
# With uv.
|
| 163 |
+
uv tool install ruff@latest # Install Ruff globally.
|
| 164 |
+
uv add --dev ruff # Or add Ruff to your project.
|
| 165 |
+
|
| 166 |
+
# With pip.
|
| 167 |
+
pip install ruff
|
| 168 |
+
|
| 169 |
+
# With pipx.
|
| 170 |
+
pipx install ruff
|
| 171 |
+
```
|
| 172 |
+
|
| 173 |
+
Starting with version `0.5.0`, Ruff can be installed with our standalone installers:
|
| 174 |
+
|
| 175 |
+
```shell
|
| 176 |
+
# On macOS and Linux.
|
| 177 |
+
curl -LsSf https://astral.sh/ruff/install.sh | sh
|
| 178 |
+
|
| 179 |
+
# On Windows.
|
| 180 |
+
powershell -c "irm https://astral.sh/ruff/install.ps1 | iex"
|
| 181 |
+
|
| 182 |
+
# For a specific version.
|
| 183 |
+
curl -LsSf https://astral.sh/ruff/0.15.0/install.sh | sh
|
| 184 |
+
powershell -c "irm https://astral.sh/ruff/0.15.0/install.ps1 | iex"
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
You can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff),
|
| 188 |
+
and with [a variety of other package managers](https://docs.astral.sh/ruff/installation/).
|
| 189 |
+
|
| 190 |
+
### Usage
|
| 191 |
+
|
| 192 |
+
To run Ruff as a linter, try any of the following:
|
| 193 |
+
|
| 194 |
+
```shell
|
| 195 |
+
ruff check # Lint all files in the current directory (and any subdirectories).
|
| 196 |
+
ruff check path/to/code/ # Lint all files in `/path/to/code` (and any subdirectories).
|
| 197 |
+
ruff check path/to/code/*.py # Lint all `.py` files in `/path/to/code`.
|
| 198 |
+
ruff check path/to/code/to/file.py # Lint `file.py`.
|
| 199 |
+
ruff check @arguments.txt # Lint using an input file, treating its contents as newline-delimited command-line arguments.
|
| 200 |
+
```
|
| 201 |
+
|
| 202 |
+
Or, to run Ruff as a formatter:
|
| 203 |
+
|
| 204 |
+
```shell
|
| 205 |
+
ruff format # Format all files in the current directory (and any subdirectories).
|
| 206 |
+
ruff format path/to/code/ # Format all files in `/path/to/code` (and any subdirectories).
|
| 207 |
+
ruff format path/to/code/*.py # Format all `.py` files in `/path/to/code`.
|
| 208 |
+
ruff format path/to/code/to/file.py # Format `file.py`.
|
| 209 |
+
ruff format @arguments.txt # Format using an input file, treating its contents as newline-delimited command-line arguments.
|
| 210 |
+
```
|
| 211 |
+
|
| 212 |
+
Ruff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff-pre-commit`](https://github.com/astral-sh/ruff-pre-commit):
|
| 213 |
+
|
| 214 |
+
```yaml
|
| 215 |
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
| 216 |
+
# Ruff version.
|
| 217 |
+
rev: v0.15.0
|
| 218 |
+
hooks:
|
| 219 |
+
# Run the linter.
|
| 220 |
+
- id: ruff-check
|
| 221 |
+
args: [ --fix ]
|
| 222 |
+
# Run the formatter.
|
| 223 |
+
- id: ruff-format
|
| 224 |
+
```
|
| 225 |
+
|
| 226 |
+
Ruff can also be used as a [VS Code extension](https://github.com/astral-sh/ruff-vscode) or with [various other editors](https://docs.astral.sh/ruff/editors/setup).
|
| 227 |
+
|
| 228 |
+
Ruff can also be used as a [GitHub Action](https://github.com/features/actions) via
|
| 229 |
+
[`ruff-action`](https://github.com/astral-sh/ruff-action):
|
| 230 |
+
|
| 231 |
+
```yaml
|
| 232 |
+
name: Ruff
|
| 233 |
+
on: [ push, pull_request ]
|
| 234 |
+
jobs:
|
| 235 |
+
ruff:
|
| 236 |
+
runs-on: ubuntu-latest
|
| 237 |
+
steps:
|
| 238 |
+
- uses: actions/checkout@v4
|
| 239 |
+
- uses: astral-sh/ruff-action@v3
|
| 240 |
+
```
|
| 241 |
+
|
| 242 |
+
### Configuration<a id="configuration"></a>
|
| 243 |
+
|
| 244 |
+
Ruff can be configured through a `pyproject.toml`, `ruff.toml`, or `.ruff.toml` file (see:
|
| 245 |
+
[_Configuration_](https://docs.astral.sh/ruff/configuration/), or [_Settings_](https://docs.astral.sh/ruff/settings/)
|
| 246 |
+
for a complete list of all configuration options).
|
| 247 |
+
|
| 248 |
+
If left unspecified, Ruff's default configuration is equivalent to the following `ruff.toml` file:
|
| 249 |
+
|
| 250 |
+
```toml
|
| 251 |
+
# Exclude a variety of commonly ignored directories.
|
| 252 |
+
exclude = [
|
| 253 |
+
".bzr",
|
| 254 |
+
".direnv",
|
| 255 |
+
".eggs",
|
| 256 |
+
".git",
|
| 257 |
+
".git-rewrite",
|
| 258 |
+
".hg",
|
| 259 |
+
".ipynb_checkpoints",
|
| 260 |
+
".mypy_cache",
|
| 261 |
+
".nox",
|
| 262 |
+
".pants.d",
|
| 263 |
+
".pyenv",
|
| 264 |
+
".pytest_cache",
|
| 265 |
+
".pytype",
|
| 266 |
+
".ruff_cache",
|
| 267 |
+
".svn",
|
| 268 |
+
".tox",
|
| 269 |
+
".venv",
|
| 270 |
+
".vscode",
|
| 271 |
+
"__pypackages__",
|
| 272 |
+
"_build",
|
| 273 |
+
"buck-out",
|
| 274 |
+
"build",
|
| 275 |
+
"dist",
|
| 276 |
+
"node_modules",
|
| 277 |
+
"site-packages",
|
| 278 |
+
"venv",
|
| 279 |
+
]
|
| 280 |
+
|
| 281 |
+
# Same as Black.
|
| 282 |
+
line-length = 88
|
| 283 |
+
indent-width = 4
|
| 284 |
+
|
| 285 |
+
# Assume Python 3.9
|
| 286 |
+
target-version = "py39"
|
| 287 |
+
|
| 288 |
+
[lint]
|
| 289 |
+
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
| 290 |
+
select = ["E4", "E7", "E9", "F"]
|
| 291 |
+
ignore = []
|
| 292 |
+
|
| 293 |
+
# Allow fix for all enabled rules (when `--fix`) is provided.
|
| 294 |
+
fixable = ["ALL"]
|
| 295 |
+
unfixable = []
|
| 296 |
+
|
| 297 |
+
# Allow unused variables when underscore-prefixed.
|
| 298 |
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
| 299 |
+
|
| 300 |
+
[format]
|
| 301 |
+
# Like Black, use double quotes for strings.
|
| 302 |
+
quote-style = "double"
|
| 303 |
+
|
| 304 |
+
# Like Black, indent with spaces, rather than tabs.
|
| 305 |
+
indent-style = "space"
|
| 306 |
+
|
| 307 |
+
# Like Black, respect magic trailing commas.
|
| 308 |
+
skip-magic-trailing-comma = false
|
| 309 |
+
|
| 310 |
+
# Like Black, automatically detect the appropriate line ending.
|
| 311 |
+
line-ending = "auto"
|
| 312 |
+
```
|
| 313 |
+
|
| 314 |
+
Note that, in a `pyproject.toml`, each section header should be prefixed with `tool.ruff`. For
|
| 315 |
+
example, `[lint]` should be replaced with `[tool.ruff.lint]`.
|
| 316 |
+
|
| 317 |
+
Some configuration options can be provided via dedicated command-line arguments, such as those
|
| 318 |
+
related to rule enablement and disablement, file discovery, and logging level:
|
| 319 |
+
|
| 320 |
+
```shell
|
| 321 |
+
ruff check --select F401 --select F403 --quiet
|
| 322 |
+
```
|
| 323 |
+
|
| 324 |
+
The remaining configuration options can be provided through a catch-all `--config` argument:
|
| 325 |
+
|
| 326 |
+
```shell
|
| 327 |
+
ruff check --config "lint.per-file-ignores = {'some_file.py' = ['F841']}"
|
| 328 |
+
```
|
| 329 |
+
|
| 330 |
+
To opt in to the latest lint rules, formatter style changes, interface updates, and more, enable
|
| 331 |
+
[preview mode](https://docs.astral.sh/ruff/rules/) by setting `preview = true` in your configuration
|
| 332 |
+
file or passing `--preview` on the command line. Preview mode enables a collection of unstable
|
| 333 |
+
features that may change prior to stabilization.
|
| 334 |
+
|
| 335 |
+
See `ruff help` for more on Ruff's top-level commands, or `ruff help check` and `ruff help format`
|
| 336 |
+
for more on the linting and formatting commands, respectively.
|
| 337 |
+
|
| 338 |
+
## Rules<a id="rules"></a>
|
| 339 |
+
|
| 340 |
+
<!-- Begin section: Rules -->
|
| 341 |
+
|
| 342 |
+
**Ruff supports over 800 lint rules**, many of which are inspired by popular tools like Flake8,
|
| 343 |
+
isort, pyupgrade, and others. Regardless of the rule's origin, Ruff re-implements every rule in
|
| 344 |
+
Rust as a first-party feature.
|
| 345 |
+
|
| 346 |
+
By default, Ruff enables Flake8's `F` rules, along with a subset of the `E` rules, omitting any
|
| 347 |
+
stylistic rules that overlap with the use of a formatter, like `ruff format` or
|
| 348 |
+
[Black](https://github.com/psf/black).
|
| 349 |
+
|
| 350 |
+
If you're just getting started with Ruff, **the default rule set is a great place to start**: it
|
| 351 |
+
catches a wide variety of common errors (like unused imports) with zero configuration.
|
| 352 |
+
|
| 353 |
+
<!-- End section: Rules -->
|
| 354 |
+
|
| 355 |
+
Beyond the defaults, Ruff re-implements some of the most popular Flake8 plugins and related code
|
| 356 |
+
quality tools, including:
|
| 357 |
+
|
| 358 |
+
- [autoflake](https://pypi.org/project/autoflake/)
|
| 359 |
+
- [eradicate](https://pypi.org/project/eradicate/)
|
| 360 |
+
- [flake8-2020](https://pypi.org/project/flake8-2020/)
|
| 361 |
+
- [flake8-annotations](https://pypi.org/project/flake8-annotations/)
|
| 362 |
+
- [flake8-async](https://pypi.org/project/flake8-async)
|
| 363 |
+
- [flake8-bandit](https://pypi.org/project/flake8-bandit/) ([#1646](https://github.com/astral-sh/ruff/issues/1646))
|
| 364 |
+
- [flake8-blind-except](https://pypi.org/project/flake8-blind-except/)
|
| 365 |
+
- [flake8-boolean-trap](https://pypi.org/project/flake8-boolean-trap/)
|
| 366 |
+
- [flake8-bugbear](https://pypi.org/project/flake8-bugbear/)
|
| 367 |
+
- [flake8-builtins](https://pypi.org/project/flake8-builtins/)
|
| 368 |
+
- [flake8-commas](https://pypi.org/project/flake8-commas/)
|
| 369 |
+
- [flake8-comprehensions](https://pypi.org/project/flake8-comprehensions/)
|
| 370 |
+
- [flake8-copyright](https://pypi.org/project/flake8-copyright/)
|
| 371 |
+
- [flake8-datetimez](https://pypi.org/project/flake8-datetimez/)
|
| 372 |
+
- [flake8-debugger](https://pypi.org/project/flake8-debugger/)
|
| 373 |
+
- [flake8-django](https://pypi.org/project/flake8-django/)
|
| 374 |
+
- [flake8-docstrings](https://pypi.org/project/flake8-docstrings/)
|
| 375 |
+
- [flake8-eradicate](https://pypi.org/project/flake8-eradicate/)
|
| 376 |
+
- [flake8-errmsg](https://pypi.org/project/flake8-errmsg/)
|
| 377 |
+
- [flake8-executable](https://pypi.org/project/flake8-executable/)
|
| 378 |
+
- [flake8-future-annotations](https://pypi.org/project/flake8-future-annotations/)
|
| 379 |
+
- [flake8-gettext](https://pypi.org/project/flake8-gettext/)
|
| 380 |
+
- [flake8-implicit-str-concat](https://pypi.org/project/flake8-implicit-str-concat/)
|
| 381 |
+
- [flake8-import-conventions](https://github.com/joaopalmeiro/flake8-import-conventions)
|
| 382 |
+
- [flake8-logging](https://pypi.org/project/flake8-logging/)
|
| 383 |
+
- [flake8-logging-format](https://pypi.org/project/flake8-logging-format/)
|
| 384 |
+
- [flake8-no-pep420](https://pypi.org/project/flake8-no-pep420)
|
| 385 |
+
- [flake8-pie](https://pypi.org/project/flake8-pie/)
|
| 386 |
+
- [flake8-print](https://pypi.org/project/flake8-print/)
|
| 387 |
+
- [flake8-pyi](https://pypi.org/project/flake8-pyi/)
|
| 388 |
+
- [flake8-pytest-style](https://pypi.org/project/flake8-pytest-style/)
|
| 389 |
+
- [flake8-quotes](https://pypi.org/project/flake8-quotes/)
|
| 390 |
+
- [flake8-raise](https://pypi.org/project/flake8-raise/)
|
| 391 |
+
- [flake8-return](https://pypi.org/project/flake8-return/)
|
| 392 |
+
- [flake8-self](https://pypi.org/project/flake8-self/)
|
| 393 |
+
- [flake8-simplify](https://pypi.org/project/flake8-simplify/)
|
| 394 |
+
- [flake8-slots](https://pypi.org/project/flake8-slots/)
|
| 395 |
+
- [flake8-super](https://pypi.org/project/flake8-super/)
|
| 396 |
+
- [flake8-tidy-imports](https://pypi.org/project/flake8-tidy-imports/)
|
| 397 |
+
- [flake8-todos](https://pypi.org/project/flake8-todos/)
|
| 398 |
+
- [flake8-type-checking](https://pypi.org/project/flake8-type-checking/)
|
| 399 |
+
- [flake8-use-pathlib](https://pypi.org/project/flake8-use-pathlib/)
|
| 400 |
+
- [flynt](https://pypi.org/project/flynt/) ([#2102](https://github.com/astral-sh/ruff/issues/2102))
|
| 401 |
+
- [isort](https://pypi.org/project/isort/)
|
| 402 |
+
- [mccabe](https://pypi.org/project/mccabe/)
|
| 403 |
+
- [pandas-vet](https://pypi.org/project/pandas-vet/)
|
| 404 |
+
- [pep8-naming](https://pypi.org/project/pep8-naming/)
|
| 405 |
+
- [pydocstyle](https://pypi.org/project/pydocstyle/)
|
| 406 |
+
- [pygrep-hooks](https://github.com/pre-commit/pygrep-hooks)
|
| 407 |
+
- [pylint-airflow](https://pypi.org/project/pylint-airflow/)
|
| 408 |
+
- [pyupgrade](https://pypi.org/project/pyupgrade/)
|
| 409 |
+
- [tryceratops](https://pypi.org/project/tryceratops/)
|
| 410 |
+
- [yesqa](https://pypi.org/project/yesqa/)
|
| 411 |
+
|
| 412 |
+
For a complete enumeration of the supported rules, see [_Rules_](https://docs.astral.sh/ruff/rules/).
|
| 413 |
+
|
| 414 |
+
## Contributing<a id="contributing"></a>
|
| 415 |
+
|
| 416 |
+
Contributions are welcome and highly appreciated. To get started, check out the
|
| 417 |
+
[**contributing guidelines**](https://docs.astral.sh/ruff/contributing/).
|
| 418 |
+
|
| 419 |
+
You can also join us on [**Discord**](https://discord.com/invite/astral-sh).
|
| 420 |
+
|
| 421 |
+
## Support<a id="support"></a>
|
| 422 |
+
|
| 423 |
+
Having trouble? Check out the existing issues on [**GitHub**](https://github.com/astral-sh/ruff/issues),
|
| 424 |
+
or feel free to [**open a new one**](https://github.com/astral-sh/ruff/issues/new).
|
| 425 |
+
|
| 426 |
+
You can also ask for help on [**Discord**](https://discord.com/invite/astral-sh).
|
| 427 |
+
|
| 428 |
+
## Acknowledgements<a id="acknowledgements"></a>
|
| 429 |
+
|
| 430 |
+
Ruff's linter draws on both the APIs and implementation details of many other
|
| 431 |
+
tools in the Python ecosystem, especially [Flake8](https://github.com/PyCQA/flake8), [Pyflakes](https://github.com/PyCQA/pyflakes),
|
| 432 |
+
[pycodestyle](https://github.com/PyCQA/pycodestyle), [pydocstyle](https://github.com/PyCQA/pydocstyle),
|
| 433 |
+
[pyupgrade](https://github.com/asottile/pyupgrade), and [isort](https://github.com/PyCQA/isort).
|
| 434 |
+
|
| 435 |
+
In some cases, Ruff includes a "direct" Rust port of the corresponding tool.
|
| 436 |
+
We're grateful to the maintainers of these tools for their work, and for all
|
| 437 |
+
the value they've provided to the Python community.
|
| 438 |
+
|
| 439 |
+
Ruff's formatter is built on a fork of Rome's [`rome_formatter`](https://github.com/rome/tools/tree/main/crates/rome_formatter),
|
| 440 |
+
and again draws on both API and implementation details from [Rome](https://github.com/rome/tools),
|
| 441 |
+
[Prettier](https://github.com/prettier/prettier), and [Black](https://github.com/psf/black).
|
| 442 |
+
|
| 443 |
+
Ruff's import resolver is based on the import resolution algorithm from [Pyright](https://github.com/microsoft/pyright).
|
| 444 |
+
|
| 445 |
+
Ruff is also influenced by a number of tools outside the Python ecosystem, like
|
| 446 |
+
[Clippy](https://github.com/rust-lang/rust-clippy) and [ESLint](https://github.com/eslint/eslint).
|
| 447 |
+
|
| 448 |
+
Ruff is the beneficiary of a large number of [contributors](https://github.com/astral-sh/ruff/graphs/contributors).
|
| 449 |
+
|
| 450 |
+
Ruff is released under the MIT license.
|
| 451 |
+
|
| 452 |
+
## Who's Using Ruff?<a id="whos-using-ruff"></a>
|
| 453 |
+
|
| 454 |
+
Ruff is used by a number of major open-source projects and companies, including:
|
| 455 |
+
|
| 456 |
+
- [Albumentations](https://github.com/albumentations-team/AlbumentationsX)
|
| 457 |
+
- Amazon ([AWS SAM](https://github.com/aws/serverless-application-model))
|
| 458 |
+
- [Anki](https://apps.ankiweb.net/)
|
| 459 |
+
- Anthropic ([Python SDK](https://github.com/anthropics/anthropic-sdk-python))
|
| 460 |
+
- [Apache Airflow](https://github.com/apache/airflow)
|
| 461 |
+
- AstraZeneca ([Magnus](https://github.com/AstraZeneca/magnus-core))
|
| 462 |
+
- [Babel](https://github.com/python-babel/babel)
|
| 463 |
+
- Benchling ([Refac](https://github.com/benchling/refac))
|
| 464 |
+
- [Bokeh](https://github.com/bokeh/bokeh)
|
| 465 |
+
- Capital One ([datacompy](https://github.com/capitalone/datacompy))
|
| 466 |
+
- CrowdCent ([NumerBlox](https://github.com/crowdcent/numerblox)) <!-- typos: ignore -->
|
| 467 |
+
- [Cryptography (PyCA)](https://github.com/pyca/cryptography)
|
| 468 |
+
- CERN ([Indico](https://getindico.io/))
|
| 469 |
+
- [DVC](https://github.com/iterative/dvc)
|
| 470 |
+
- [Dagger](https://github.com/dagger/dagger)
|
| 471 |
+
- [Dagster](https://github.com/dagster-io/dagster)
|
| 472 |
+
- Databricks ([MLflow](https://github.com/mlflow/mlflow))
|
| 473 |
+
- [Dify](https://github.com/langgenius/dify)
|
| 474 |
+
- [FastAPI](https://github.com/tiangolo/fastapi)
|
| 475 |
+
- [Godot](https://github.com/godotengine/godot)
|
| 476 |
+
- [Gradio](https://github.com/gradio-app/gradio)
|
| 477 |
+
- [Great Expectations](https://github.com/great-expectations/great_expectations)
|
| 478 |
+
- [HTTPX](https://github.com/encode/httpx)
|
| 479 |
+
- [Hatch](https://github.com/pypa/hatch)
|
| 480 |
+
- [Home Assistant](https://github.com/home-assistant/core)
|
| 481 |
+
- Hugging Face ([Transformers](https://github.com/huggingface/transformers),
|
| 482 |
+
[Datasets](https://github.com/huggingface/datasets),
|
| 483 |
+
[Diffusers](https://github.com/huggingface/diffusers))
|
| 484 |
+
- IBM ([Qiskit](https://github.com/Qiskit/qiskit))
|
| 485 |
+
- ING Bank ([popmon](https://github.com/ing-bank/popmon), [probatus](https://github.com/ing-bank/probatus))
|
| 486 |
+
- [Ibis](https://github.com/ibis-project/ibis)
|
| 487 |
+
- [ivy](https://github.com/unifyai/ivy)
|
| 488 |
+
- [JAX](https://github.com/jax-ml/jax)
|
| 489 |
+
- [Jupyter](https://github.com/jupyter-server/jupyter_server)
|
| 490 |
+
- [Kraken Tech](https://kraken.tech/)
|
| 491 |
+
- [LangChain](https://github.com/hwchase17/langchain)
|
| 492 |
+
- [Litestar](https://litestar.dev/)
|
| 493 |
+
- [LlamaIndex](https://github.com/jerryjliu/llama_index)
|
| 494 |
+
- Matrix ([Synapse](https://github.com/matrix-org/synapse))
|
| 495 |
+
- [MegaLinter](https://github.com/oxsecurity/megalinter)
|
| 496 |
+
- Meltano ([Meltano CLI](https://github.com/meltano/meltano), [Singer SDK](https://github.com/meltano/sdk))
|
| 497 |
+
- Microsoft ([Semantic Kernel](https://github.com/microsoft/semantic-kernel),
|
| 498 |
+
[ONNX Runtime](https://github.com/microsoft/onnxruntime),
|
| 499 |
+
[LightGBM](https://github.com/microsoft/LightGBM))
|
| 500 |
+
- Modern Treasury ([Python SDK](https://github.com/Modern-Treasury/modern-treasury-python))
|
| 501 |
+
- Mozilla ([Firefox](https://github.com/mozilla/gecko-dev))
|
| 502 |
+
- [Mypy](https://github.com/python/mypy)
|
| 503 |
+
- [Nautobot](https://github.com/nautobot/nautobot)
|
| 504 |
+
- Netflix ([Dispatch](https://github.com/Netflix/dispatch))
|
| 505 |
+
- [Neon](https://github.com/neondatabase/neon)
|
| 506 |
+
- [Nokia](https://nokia.com/)
|
| 507 |
+
- [NoneBot](https://github.com/nonebot/nonebot2)
|
| 508 |
+
- [NumPyro](https://github.com/pyro-ppl/numpyro)
|
| 509 |
+
- [ONNX](https://github.com/onnx/onnx)
|
| 510 |
+
- [OpenBB](https://github.com/OpenBB-finance/OpenBBTerminal)
|
| 511 |
+
- [Open Wine Components](https://github.com/Open-Wine-Components/umu-launcher)
|
| 512 |
+
- [PDM](https://github.com/pdm-project/pdm)
|
| 513 |
+
- [PaddlePaddle](https://github.com/PaddlePaddle/Paddle)
|
| 514 |
+
- [Pandas](https://github.com/pandas-dev/pandas)
|
| 515 |
+
- [Pillow](https://github.com/python-pillow/Pillow)
|
| 516 |
+
- [Poetry](https://github.com/python-poetry/poetry)
|
| 517 |
+
- [Polars](https://github.com/pola-rs/polars)
|
| 518 |
+
- [PostHog](https://github.com/PostHog/posthog)
|
| 519 |
+
- Prefect ([Python SDK](https://github.com/PrefectHQ/prefect), [Marvin](https://github.com/PrefectHQ/marvin))
|
| 520 |
+
- [PyInstaller](https://github.com/pyinstaller/pyinstaller)
|
| 521 |
+
- [PyMC](https://github.com/pymc-devs/pymc/)
|
| 522 |
+
- [PyMC-Marketing](https://github.com/pymc-labs/pymc-marketing)
|
| 523 |
+
- [pytest](https://github.com/pytest-dev/pytest)
|
| 524 |
+
- [PyTorch](https://github.com/pytorch/pytorch)
|
| 525 |
+
- [Pydantic](https://github.com/pydantic/pydantic)
|
| 526 |
+
- [Pylint](https://github.com/PyCQA/pylint)
|
| 527 |
+
- [PyScripter](https://github.com/pyscripter/pyscripter)
|
| 528 |
+
- [PyVista](https://github.com/pyvista/pyvista)
|
| 529 |
+
- [Reflex](https://github.com/reflex-dev/reflex)
|
| 530 |
+
- [River](https://github.com/online-ml/river)
|
| 531 |
+
- [Rippling](https://rippling.com)
|
| 532 |
+
- [Robyn](https://github.com/sansyrox/robyn)
|
| 533 |
+
- [Saleor](https://github.com/saleor/saleor)
|
| 534 |
+
- Scale AI ([Launch SDK](https://github.com/scaleapi/launch-python-client))
|
| 535 |
+
- [SciPy](https://github.com/scipy/scipy)
|
| 536 |
+
- Snowflake ([SnowCLI](https://github.com/Snowflake-Labs/snowcli))
|
| 537 |
+
- [Sphinx](https://github.com/sphinx-doc/sphinx)
|
| 538 |
+
- [Stable Baselines3](https://github.com/DLR-RM/stable-baselines3)
|
| 539 |
+
- [Starlette](https://github.com/encode/starlette)
|
| 540 |
+
- [Streamlit](https://github.com/streamlit/streamlit)
|
| 541 |
+
- [The Algorithms](https://github.com/TheAlgorithms/Python)
|
| 542 |
+
- [Vega-Altair](https://github.com/altair-viz/altair)
|
| 543 |
+
- [Weblate](https://weblate.org/)
|
| 544 |
+
- WordPress ([Openverse](https://github.com/WordPress/openverse))
|
| 545 |
+
- [ZenML](https://github.com/zenml-io/zenml)
|
| 546 |
+
- [Zulip](https://github.com/zulip/zulip)
|
| 547 |
+
- [build (PyPA)](https://github.com/pypa/build)
|
| 548 |
+
- [cibuildwheel (PyPA)](https://github.com/pypa/cibuildwheel)
|
| 549 |
+
- [delta-rs](https://github.com/delta-io/delta-rs)
|
| 550 |
+
- [featuretools](https://github.com/alteryx/featuretools)
|
| 551 |
+
- [meson-python](https://github.com/mesonbuild/meson-python)
|
| 552 |
+
- [nox](https://github.com/wntrblm/nox)
|
| 553 |
+
- [pip](https://github.com/pypa/pip)
|
| 554 |
+
|
| 555 |
+
### Show Your Support
|
| 556 |
+
|
| 557 |
+
If you're using Ruff, consider adding the Ruff badge to your project's `README.md`:
|
| 558 |
+
|
| 559 |
+
```md
|
| 560 |
+
[](https://github.com/astral-sh/ruff)
|
| 561 |
+
```
|
| 562 |
+
|
| 563 |
+
...or `README.rst`:
|
| 564 |
+
|
| 565 |
+
```rst
|
| 566 |
+
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
|
| 567 |
+
:target: https://github.com/astral-sh/ruff
|
| 568 |
+
:alt: Ruff
|
| 569 |
+
```
|
| 570 |
+
|
| 571 |
+
...or, as HTML:
|
| 572 |
+
|
| 573 |
+
```html
|
| 574 |
+
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff" style="max-width:100%;"></a>
|
| 575 |
+
```
|
| 576 |
+
|
| 577 |
+
## License<a id="license"></a>
|
| 578 |
+
|
| 579 |
+
This repository is licensed under the [MIT License](https://github.com/astral-sh/ruff/blob/main/LICENSE)
|
| 580 |
+
|
| 581 |
+
<div align="center">
|
| 582 |
+
<a target="_blank" href="https://astral.sh" style="background:none">
|
| 583 |
+
<img src="https://raw.githubusercontent.com/astral-sh/ruff/main/assets/svg/Astral.svg" alt="Made by Astral">
|
| 584 |
+
</a>
|
| 585 |
+
</div>
|
| 586 |
+
|
.cache/pip/http-v2/2/9/f/a/a/29faa3e056e1121f184f57a41776ad530481b463d3e654420e75baa9
ADDED
|
Binary file (1.16 kB). View file
|
|
|
.cache/pip/http-v2/2/b/0/a/4/2b0a4fda1a2c912a5a1c5245a8b34b5da87876e311f607befabc98ee
ADDED
|
Binary file (1.16 kB). View file
|
|
|
.cache/pip/http-v2/2/b/0/a/4/2b0a4fda1a2c912a5a1c5245a8b34b5da87876e311f607befabc98ee.body
ADDED
|
Binary file (87.3 kB). View file
|
|
|
.cache/pip/http-v2/2/b/c/4/6/2bc462f2fe975661ddcee00520817d6e0e56e0d082ec661011b21a6b
ADDED
|
Binary file (1.22 kB). View file
|
|
|
.cache/pip/http-v2/2/b/c/4/6/2bc462f2fe975661ddcee00520817d6e0e56e0d082ec661011b21a6b.body
ADDED
|
Binary file (15.6 kB). View file
|
|
|
.cache/pip/http-v2/2/c/9/b/6/2c9b61ac2fe4234e3e98894b97f9565b9cc3ed29c40275c61efc4076
ADDED
|
Binary file (1.12 kB). View file
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: annotated-doc
|
| 3 |
+
Version: 0.0.4
|
| 4 |
+
Summary: Document parameters, class attributes, return types, and variables inline, with Annotated.
|
| 5 |
+
Author-Email: =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <tiangolo@gmail.com>
|
| 6 |
+
License-Expression: MIT
|
| 7 |
+
License-File: LICENSE
|
| 8 |
+
Classifier: Intended Audience :: Information Technology
|
| 9 |
+
Classifier: Intended Audience :: System Administrators
|
| 10 |
+
Classifier: Operating System :: OS Independent
|
| 11 |
+
Classifier: Programming Language :: Python :: 3
|
| 12 |
+
Classifier: Programming Language :: Python
|
| 13 |
+
Classifier: Topic :: Internet
|
| 14 |
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
| 15 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
| 16 |
+
Classifier: Topic :: Software Development :: Libraries
|
| 17 |
+
Classifier: Topic :: Software Development
|
| 18 |
+
Classifier: Typing :: Typed
|
| 19 |
+
Classifier: Development Status :: 4 - Beta
|
| 20 |
+
Classifier: Intended Audience :: Developers
|
| 21 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 22 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 23 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 24 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 25 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 26 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 27 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 28 |
+
Classifier: Programming Language :: Python :: 3.14
|
| 29 |
+
Project-URL: Homepage, https://github.com/fastapi/annotated-doc
|
| 30 |
+
Project-URL: Documentation, https://github.com/fastapi/annotated-doc
|
| 31 |
+
Project-URL: Repository, https://github.com/fastapi/annotated-doc
|
| 32 |
+
Project-URL: Issues, https://github.com/fastapi/annotated-doc/issues
|
| 33 |
+
Project-URL: Changelog, https://github.com/fastapi/annotated-doc/release-notes.md
|
| 34 |
+
Requires-Python: >=3.8
|
| 35 |
+
Description-Content-Type: text/markdown
|
| 36 |
+
|
| 37 |
+
# Annotated Doc
|
| 38 |
+
|
| 39 |
+
Document parameters, class attributes, return types, and variables inline, with `Annotated`.
|
| 40 |
+
|
| 41 |
+
<a href="https://github.com/fastapi/annotated-doc/actions?query=workflow%3ATest+event%3Apush+branch%3Amain" target="_blank">
|
| 42 |
+
<img src="https://github.com/fastapi/annotated-doc/actions/workflows/test.yml/badge.svg?event=push&branch=main" alt="Test">
|
| 43 |
+
</a>
|
| 44 |
+
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/annotated-doc" target="_blank">
|
| 45 |
+
<img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/annotated-doc.svg" alt="Coverage">
|
| 46 |
+
</a>
|
| 47 |
+
<a href="https://pypi.org/project/annotated-doc" target="_blank">
|
| 48 |
+
<img src="https://img.shields.io/pypi/v/annotated-doc?color=%2334D058&label=pypi%20package" alt="Package version">
|
| 49 |
+
</a>
|
| 50 |
+
<a href="https://pypi.org/project/annotated-doc" target="_blank">
|
| 51 |
+
<img src="https://img.shields.io/pypi/pyversions/annotated-doc.svg?color=%2334D058" alt="Supported Python versions">
|
| 52 |
+
</a>
|
| 53 |
+
|
| 54 |
+
## Installation
|
| 55 |
+
|
| 56 |
+
```bash
|
| 57 |
+
pip install annotated-doc
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
Or with `uv`:
|
| 61 |
+
|
| 62 |
+
```Python
|
| 63 |
+
uv add annotated-doc
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Usage
|
| 67 |
+
|
| 68 |
+
Import `Doc` and pass a single literal string with the documentation for the specific parameter, class attribute, return type, or variable.
|
| 69 |
+
|
| 70 |
+
For example, to document a parameter `name` in a function `hi` you could do:
|
| 71 |
+
|
| 72 |
+
```Python
|
| 73 |
+
from typing import Annotated
|
| 74 |
+
|
| 75 |
+
from annotated_doc import Doc
|
| 76 |
+
|
| 77 |
+
def hi(name: Annotated[str, Doc("Who to say hi to")]) -> None:
|
| 78 |
+
print(f"Hi, {name}!")
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
You can also use it to document class attributes:
|
| 82 |
+
|
| 83 |
+
```Python
|
| 84 |
+
from typing import Annotated
|
| 85 |
+
|
| 86 |
+
from annotated_doc import Doc
|
| 87 |
+
|
| 88 |
+
class User:
|
| 89 |
+
name: Annotated[str, Doc("The user's name")]
|
| 90 |
+
age: Annotated[int, Doc("The user's age")]
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
The same way, you could document return types and variables, or anything that could have a type annotation with `Annotated`.
|
| 94 |
+
|
| 95 |
+
## Who Uses This
|
| 96 |
+
|
| 97 |
+
`annotated-doc` was made for:
|
| 98 |
+
|
| 99 |
+
* [FastAPI](https://fastapi.tiangolo.com/)
|
| 100 |
+
* [Typer](https://typer.tiangolo.com/)
|
| 101 |
+
* [SQLModel](https://sqlmodel.tiangolo.com/)
|
| 102 |
+
* [Asyncer](https://asyncer.tiangolo.com/)
|
| 103 |
+
|
| 104 |
+
`annotated-doc` is supported by [griffe-typingdoc](https://github.com/mkdocstrings/griffe-typingdoc), which powers reference documentation like the one in the [FastAPI Reference](https://fastapi.tiangolo.com/reference/).
|
| 105 |
+
|
| 106 |
+
## Reasons not to use `annotated-doc`
|
| 107 |
+
|
| 108 |
+
You are already comfortable with one of the existing docstring formats, like:
|
| 109 |
+
|
| 110 |
+
* Sphinx
|
| 111 |
+
* numpydoc
|
| 112 |
+
* Google
|
| 113 |
+
* Keras
|
| 114 |
+
|
| 115 |
+
Your team is already comfortable using them.
|
| 116 |
+
|
| 117 |
+
You prefer having the documentation about parameters all together in a docstring, separated from the code defining them.
|
| 118 |
+
|
| 119 |
+
You care about a specific set of users, using one specific editor, and that editor already has support for the specific docstring format you use.
|
| 120 |
+
|
| 121 |
+
## Reasons to use `annotated-doc`
|
| 122 |
+
|
| 123 |
+
* No micro-syntax to learn for newcomers, it’s **just Python** syntax.
|
| 124 |
+
* **Editing** would be already fully supported by default by any editor (current or future) supporting Python syntax, including syntax errors, syntax highlighting, etc.
|
| 125 |
+
* **Rendering** would be relatively straightforward to implement by static tools (tools that don't need runtime execution), as the information can be extracted from the AST they normally already create.
|
| 126 |
+
* **Deduplication of information**: the name of a parameter would be defined in a single place, not duplicated inside of a docstring.
|
| 127 |
+
* **Elimination** of the possibility of having **inconsistencies** when removing a parameter or class variable and **forgetting to remove** its documentation.
|
| 128 |
+
* **Minimization** of the probability of adding a new parameter or class variable and **forgetting to add its documentation**.
|
| 129 |
+
* **Elimination** of the possibility of having **inconsistencies** between the **name** of a parameter in the **signature** and the name in the docstring when it is renamed.
|
| 130 |
+
* **Access** to the documentation string for each symbol at **runtime**, including existing (older) Python versions.
|
| 131 |
+
* A more formalized way to document other symbols, like type aliases, that could use Annotated.
|
| 132 |
+
* **Support** for apps using FastAPI, Typer and others.
|
| 133 |
+
* **AI Accessibility**: AI tools will have an easier way understanding each parameter as the distance from documentation to parameter is much closer.
|
| 134 |
+
|
| 135 |
+
## History
|
| 136 |
+
|
| 137 |
+
I ([@tiangolo](https://github.com/tiangolo)) originally wanted for this to be part of the Python standard library (in [PEP 727](https://peps.python.org/pep-0727/)), but the proposal was withdrawn as there was a fair amount of negative feedback and opposition.
|
| 138 |
+
|
| 139 |
+
The conclusion was that this was better done as an external effort, in a third-party library.
|
| 140 |
+
|
| 141 |
+
So, here it is, with a simpler approach, as a third-party library, in a way that can be used by others, starting with FastAPI and friends.
|
| 142 |
+
|
| 143 |
+
## License
|
| 144 |
+
|
| 145 |
+
This project is licensed under the terms of the MIT license.
|
.cache/pip/http-v2/2/d/d/6/6/2dd66b0fcdd4067819bad62a54cb0add7bd0c1efcbf542054ba991c4
ADDED
|
Binary file (1.21 kB). View file
|
|
|
.cache/pip/http-v2/2/d/d/6/6/2dd66b0fcdd4067819bad62a54cb0add7bd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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: tokenizers
|
| 3 |
+
Version: 0.22.2
|
| 4 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 5 |
+
Classifier: Intended Audience :: Developers
|
| 6 |
+
Classifier: Intended Audience :: Education
|
| 7 |
+
Classifier: Intended Audience :: Science/Research
|
| 8 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
| 9 |
+
Classifier: Operating System :: OS Independent
|
| 10 |
+
Classifier: Programming Language :: Python :: 3
|
| 11 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 12 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 13 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 14 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 15 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 16 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 17 |
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
| 18 |
+
Requires-Dist: huggingface-hub>=0.16.4,<2.0
|
| 19 |
+
Requires-Dist: pytest ; extra == 'testing'
|
| 20 |
+
Requires-Dist: pytest-asyncio ; extra == 'testing'
|
| 21 |
+
Requires-Dist: requests ; extra == 'testing'
|
| 22 |
+
Requires-Dist: numpy ; extra == 'testing'
|
| 23 |
+
Requires-Dist: datasets ; extra == 'testing'
|
| 24 |
+
Requires-Dist: ruff ; extra == 'testing'
|
| 25 |
+
Requires-Dist: ty ; extra == 'testing'
|
| 26 |
+
Requires-Dist: sphinx ; extra == 'docs'
|
| 27 |
+
Requires-Dist: sphinx-rtd-theme ; extra == 'docs'
|
| 28 |
+
Requires-Dist: setuptools-rust ; extra == 'docs'
|
| 29 |
+
Requires-Dist: tokenizers[testing] ; extra == 'dev'
|
| 30 |
+
Provides-Extra: testing
|
| 31 |
+
Provides-Extra: docs
|
| 32 |
+
Provides-Extra: dev
|
| 33 |
+
Keywords: NLP,tokenizer,BPE,transformer,deep learning
|
| 34 |
+
Author-email: Nicolas Patry <patry.nicolas@protonmail.com>, Anthony Moi <anthony@huggingface.co>
|
| 35 |
+
Requires-Python: >=3.9
|
| 36 |
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
| 37 |
+
Project-URL: Homepage, https://github.com/huggingface/tokenizers
|
| 38 |
+
Project-URL: Source, https://github.com/huggingface/tokenizers
|
| 39 |
+
|
| 40 |
+
<p align="center">
|
| 41 |
+
<br>
|
| 42 |
+
<img src="https://huggingface.co/landing/assets/tokenizers/tokenizers-logo.png" width="600"/>
|
| 43 |
+
<br>
|
| 44 |
+
<p>
|
| 45 |
+
<p align="center">
|
| 46 |
+
<a href="https://badge.fury.io/py/tokenizers">
|
| 47 |
+
<img alt="Build" src="https://badge.fury.io/py/tokenizers.svg">
|
| 48 |
+
</a>
|
| 49 |
+
<a href="https://github.com/huggingface/tokenizers/blob/master/LICENSE">
|
| 50 |
+
<img alt="GitHub" src="https://img.shields.io/github/license/huggingface/tokenizers.svg?color=blue">
|
| 51 |
+
</a>
|
| 52 |
+
</p>
|
| 53 |
+
<br>
|
| 54 |
+
|
| 55 |
+
# Tokenizers
|
| 56 |
+
|
| 57 |
+
Provides an implementation of today's most used tokenizers, with a focus on performance and
|
| 58 |
+
versatility.
|
| 59 |
+
|
| 60 |
+
Bindings over the [Rust](https://github.com/huggingface/tokenizers/tree/master/tokenizers) implementation.
|
| 61 |
+
If you are interested in the High-level design, you can go check it there.
|
| 62 |
+
|
| 63 |
+
Otherwise, let's dive in!
|
| 64 |
+
|
| 65 |
+
## Main features:
|
| 66 |
+
|
| 67 |
+
- Train new vocabularies and tokenize using 4 pre-made tokenizers (Bert WordPiece and the 3
|
| 68 |
+
most common BPE versions).
|
| 69 |
+
- Extremely fast (both training and tokenization), thanks to the Rust implementation. Takes
|
| 70 |
+
less than 20 seconds to tokenize a GB of text on a server's CPU.
|
| 71 |
+
- Easy to use, but also extremely versatile.
|
| 72 |
+
- Designed for research and production.
|
| 73 |
+
- Normalization comes with alignments tracking. It's always possible to get the part of the
|
| 74 |
+
original sentence that corresponds to a given token.
|
| 75 |
+
- Does all the pre-processing: Truncate, Pad, add the special tokens your model needs.
|
| 76 |
+
|
| 77 |
+
### Installation
|
| 78 |
+
|
| 79 |
+
#### With pip:
|
| 80 |
+
|
| 81 |
+
```bash
|
| 82 |
+
pip install tokenizers
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
#### From sources:
|
| 86 |
+
|
| 87 |
+
To use this method, you need to have the Rust installed:
|
| 88 |
+
|
| 89 |
+
```bash
|
| 90 |
+
# Install with:
|
| 91 |
+
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
| 92 |
+
export PATH="$HOME/.cargo/bin:$PATH"
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
Once Rust is installed, you can compile doing the following
|
| 96 |
+
|
| 97 |
+
```bash
|
| 98 |
+
git clone https://github.com/huggingface/tokenizers
|
| 99 |
+
cd tokenizers/bindings/python
|
| 100 |
+
|
| 101 |
+
# Create a virtual env (you can use yours as well)
|
| 102 |
+
python -m venv .env
|
| 103 |
+
source .env/bin/activate
|
| 104 |
+
|
| 105 |
+
# Install `tokenizers` in the current virtual env
|
| 106 |
+
pip install -e .
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
### Load a pretrained tokenizer from the Hub
|
| 110 |
+
|
| 111 |
+
```python
|
| 112 |
+
from tokenizers import Tokenizer
|
| 113 |
+
|
| 114 |
+
tokenizer = Tokenizer.from_pretrained("bert-base-cased")
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
### Using the provided Tokenizers
|
| 118 |
+
|
| 119 |
+
We provide some pre-build tokenizers to cover the most common cases. You can easily load one of
|
| 120 |
+
these using some `vocab.json` and `merges.txt` files:
|
| 121 |
+
|
| 122 |
+
```python
|
| 123 |
+
from tokenizers import CharBPETokenizer
|
| 124 |
+
|
| 125 |
+
# Initialize a tokenizer
|
| 126 |
+
vocab = "./path/to/vocab.json"
|
| 127 |
+
merges = "./path/to/merges.txt"
|
| 128 |
+
tokenizer = CharBPETokenizer(vocab, merges)
|
| 129 |
+
|
| 130 |
+
# And then encode:
|
| 131 |
+
encoded = tokenizer.encode("I can feel the magic, can you?")
|
| 132 |
+
print(encoded.ids)
|
| 133 |
+
print(encoded.tokens)
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
And you can train them just as simply:
|
| 137 |
+
|
| 138 |
+
```python
|
| 139 |
+
from tokenizers import CharBPETokenizer
|
| 140 |
+
|
| 141 |
+
# Initialize a tokenizer
|
| 142 |
+
tokenizer = CharBPETokenizer()
|
| 143 |
+
|
| 144 |
+
# Then train it!
|
| 145 |
+
tokenizer.train([ "./path/to/files/1.txt", "./path/to/files/2.txt" ])
|
| 146 |
+
|
| 147 |
+
# Now, let's use it:
|
| 148 |
+
encoded = tokenizer.encode("I can feel the magic, can you?")
|
| 149 |
+
|
| 150 |
+
# And finally save it somewhere
|
| 151 |
+
tokenizer.save("./path/to/directory/my-bpe.tokenizer.json")
|
| 152 |
+
```
|
| 153 |
+
|
| 154 |
+
#### Provided Tokenizers
|
| 155 |
+
|
| 156 |
+
- `CharBPETokenizer`: The original BPE
|
| 157 |
+
- `ByteLevelBPETokenizer`: The byte level version of the BPE
|
| 158 |
+
- `SentencePieceBPETokenizer`: A BPE implementation compatible with the one used by SentencePiece
|
| 159 |
+
- `BertWordPieceTokenizer`: The famous Bert tokenizer, using WordPiece
|
| 160 |
+
|
| 161 |
+
All of these can be used and trained as explained above!
|
| 162 |
+
|
| 163 |
+
### Build your own
|
| 164 |
+
|
| 165 |
+
Whenever these provided tokenizers don't give you enough freedom, you can build your own tokenizer,
|
| 166 |
+
by putting all the different parts you need together.
|
| 167 |
+
You can check how we implemented the [provided tokenizers](https://github.com/huggingface/tokenizers/tree/master/bindings/python/py_src/tokenizers/implementations) and adapt them easily to your own needs.
|
| 168 |
+
|
| 169 |
+
#### Building a byte-level BPE
|
| 170 |
+
|
| 171 |
+
Here is an example showing how to build your own byte-level BPE by putting all the different pieces
|
| 172 |
+
together, and then saving it to a single file:
|
| 173 |
+
|
| 174 |
+
```python
|
| 175 |
+
from tokenizers import Tokenizer, models, pre_tokenizers, decoders, trainers, processors
|
| 176 |
+
|
| 177 |
+
# Initialize a tokenizer
|
| 178 |
+
tokenizer = Tokenizer(models.BPE())
|
| 179 |
+
|
| 180 |
+
# Customize pre-tokenization and decoding
|
| 181 |
+
tokenizer.pre_tokenizer = pre_tokenizers.ByteLevel(add_prefix_space=True)
|
| 182 |
+
tokenizer.decoder = decoders.ByteLevel()
|
| 183 |
+
tokenizer.post_processor = processors.ByteLevel(trim_offsets=True)
|
| 184 |
+
|
| 185 |
+
# And then train
|
| 186 |
+
trainer = trainers.BpeTrainer(
|
| 187 |
+
vocab_size=20000,
|
| 188 |
+
min_frequency=2,
|
| 189 |
+
initial_alphabet=pre_tokenizers.ByteLevel.alphabet()
|
| 190 |
+
)
|
| 191 |
+
tokenizer.train([
|
| 192 |
+
"./path/to/dataset/1.txt",
|
| 193 |
+
"./path/to/dataset/2.txt",
|
| 194 |
+
"./path/to/dataset/3.txt"
|
| 195 |
+
], trainer=trainer)
|
| 196 |
+
|
| 197 |
+
# And Save it
|
| 198 |
+
tokenizer.save("byte-level-bpe.tokenizer.json", pretty=True)
|
| 199 |
+
```
|
| 200 |
+
|
| 201 |
+
Now, when you want to use this tokenizer, this is as simple as:
|
| 202 |
+
|
| 203 |
+
```python
|
| 204 |
+
from tokenizers import Tokenizer
|
| 205 |
+
|
| 206 |
+
tokenizer = Tokenizer.from_file("byte-level-bpe.tokenizer.json")
|
| 207 |
+
|
| 208 |
+
encoded = tokenizer.encode("I can feel the magic, can you?")
|
| 209 |
+
```
|
| 210 |
+
|
| 211 |
+
### Typing support and `stub.py`
|
| 212 |
+
|
| 213 |
+
The compiled PyO3 extension does not expose type annotations, so editors and type checkers would otherwise see most objects as `Any`. The `stub.py` helper walks the loaded extension modules, renders `.pyi` stub files (plus minimal forwarding `__init__.py` shims), and formats them so that tools like mypy/pyright can understand the public API. Run `python stub.py` whenever you change the Python-visible surface to keep the generated stubs in sync.
|
| 214 |
+
|
.cache/pip/http-v2/5/2/0/5/a/5205a928a42073130f8425c1223b628bd19f7bcadf716204477ab472
ADDED
|
Binary file (1.17 kB). View file
|
|
|
.cache/pip/http-v2/5/2/0/5/a/5205a928a42073130f8425c1223b628bd19f7bcadf716204477ab472.body
ADDED
|
@@ -0,0 +1,1086 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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dev@python.org>
|
| 6 |
+
License: Copyright (c) 2001-2002 Enthought, Inc. 2003, SciPy Developers.
|
| 7 |
+
All rights reserved.
|
| 8 |
+
|
| 9 |
+
Redistribution and use in source and binary forms, with or without
|
| 10 |
+
modification, are permitted provided that the following conditions
|
| 11 |
+
are met:
|
| 12 |
+
|
| 13 |
+
1. Redistributions of source code must retain the above copyright
|
| 14 |
+
notice, this list of conditions and the following disclaimer.
|
| 15 |
+
|
| 16 |
+
2. Redistributions in binary form must reproduce the above
|
| 17 |
+
copyright notice, this list of conditions and the following
|
| 18 |
+
disclaimer in the documentation and/or other materials provided
|
| 19 |
+
with the distribution.
|
| 20 |
+
|
| 21 |
+
3. Neither the name of the copyright holder nor the names of its
|
| 22 |
+
contributors may be used to endorse or promote products derived
|
| 23 |
+
from this software without specific prior written permission.
|
| 24 |
+
|
| 25 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 26 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 27 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 28 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 29 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 30 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 31 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 32 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 33 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 34 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 35 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 36 |
+
|
| 37 |
+
----
|
| 38 |
+
|
| 39 |
+
This binary distribution of SciPy can also bundle the following software
|
| 40 |
+
(depending on the build):
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
Name: OpenBLAS
|
| 44 |
+
Files: scipy.libs/libscipy_openblas*.so
|
| 45 |
+
Description: bundled as a dynamically linked library
|
| 46 |
+
Availability: https://github.com/OpenMathLib/OpenBLAS/
|
| 47 |
+
License: BSD-3-Clause
|
| 48 |
+
Copyright (c) 2011-2014, The OpenBLAS Project
|
| 49 |
+
All rights reserved.
|
| 50 |
+
|
| 51 |
+
Redistribution and use in source and binary forms, with or without
|
| 52 |
+
modification, are permitted provided that the following conditions are
|
| 53 |
+
met:
|
| 54 |
+
|
| 55 |
+
1. Redistributions of source code must retain the above copyright
|
| 56 |
+
notice, this list of conditions and the following disclaimer.
|
| 57 |
+
|
| 58 |
+
2. Redistributions in binary form must reproduce the above copyright
|
| 59 |
+
notice, this list of conditions and the following disclaimer in
|
| 60 |
+
the documentation and/or other materials provided with the
|
| 61 |
+
distribution.
|
| 62 |
+
3. Neither the name of the OpenBLAS project nor the names of
|
| 63 |
+
its contributors may be used to endorse or promote products
|
| 64 |
+
derived from this software without specific prior written
|
| 65 |
+
permission.
|
| 66 |
+
|
| 67 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 68 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 69 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| 70 |
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
| 71 |
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 72 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 73 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 74 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 75 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
| 76 |
+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
Name: LAPACK
|
| 80 |
+
Files: scipy.libs/libscipy_openblas*.so
|
| 81 |
+
Description: bundled in OpenBLAS
|
| 82 |
+
Availability: https://github.com/OpenMathLib/OpenBLAS/
|
| 83 |
+
License: BSD-3-Clause-Open-MPI
|
| 84 |
+
Copyright (c) 1992-2013 The University of Tennessee and The University
|
| 85 |
+
of Tennessee Research Foundation. All rights
|
| 86 |
+
reserved.
|
| 87 |
+
Copyright (c) 2000-2013 The University of California Berkeley. All
|
| 88 |
+
rights reserved.
|
| 89 |
+
Copyright (c) 2006-2013 The University of Colorado Denver. All rights
|
| 90 |
+
reserved.
|
| 91 |
+
|
| 92 |
+
$COPYRIGHT$
|
| 93 |
+
|
| 94 |
+
Additional copyrights may follow
|
| 95 |
+
|
| 96 |
+
$HEADER$
|
| 97 |
+
|
| 98 |
+
Redistribution and use in source and binary forms, with or without
|
| 99 |
+
modification, are permitted provided that the following conditions are
|
| 100 |
+
met:
|
| 101 |
+
|
| 102 |
+
- Redistributions of source code must retain the above copyright
|
| 103 |
+
notice, this list of conditions and the following disclaimer.
|
| 104 |
+
|
| 105 |
+
- Redistributions in binary form must reproduce the above copyright
|
| 106 |
+
notice, this list of conditions and the following disclaimer listed
|
| 107 |
+
in this license in the documentation and/or other materials
|
| 108 |
+
provided with the distribution.
|
| 109 |
+
|
| 110 |
+
- Neither the name of the copyright holders nor the names of its
|
| 111 |
+
contributors may be used to endorse or promote products derived from
|
| 112 |
+
this software without specific prior written permission.
|
| 113 |
+
|
| 114 |
+
The copyright holders provide no reassurances that the source code
|
| 115 |
+
provided does not infringe any patent, copyright, or any other
|
| 116 |
+
intellectual property rights of third parties. The copyright holders
|
| 117 |
+
disclaim any liability to any recipient for claims brought against
|
| 118 |
+
recipient by any third party for infringement of that parties
|
| 119 |
+
intellectual property rights.
|
| 120 |
+
|
| 121 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 122 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 123 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 124 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 125 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 126 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 127 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 128 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 129 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 130 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 131 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
Name: GCC runtime library
|
| 135 |
+
Files: scipy.libs/libgfortran*.so
|
| 136 |
+
Description: dynamically linked to files compiled with gcc
|
| 137 |
+
Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libgfortran
|
| 138 |
+
License: GPL-3.0-or-later WITH GCC-exception-3.1
|
| 139 |
+
Copyright (C) 2002-2017 Free Software Foundation, Inc.
|
| 140 |
+
|
| 141 |
+
Libgfortran is free software; you can redistribute it and/or modify
|
| 142 |
+
it under the terms of the GNU General Public License as published by
|
| 143 |
+
the Free Software Foundation; either version 3, or (at your option)
|
| 144 |
+
any later version.
|
| 145 |
+
|
| 146 |
+
Libgfortran is distributed in the hope that it will be useful,
|
| 147 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 148 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 149 |
+
GNU General Public License for more details.
|
| 150 |
+
|
| 151 |
+
Under Section 7 of GPL version 3, you are granted additional
|
| 152 |
+
permissions described in the GCC Runtime Library Exception, version
|
| 153 |
+
3.1, as published by the Free Software Foundation.
|
| 154 |
+
|
| 155 |
+
You should have received a copy of the GNU General Public License and
|
| 156 |
+
a copy of the GCC Runtime Library Exception along with this program;
|
| 157 |
+
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
| 158 |
+
<http://www.gnu.org/licenses/>.
|
| 159 |
+
|
| 160 |
+
----
|
| 161 |
+
|
| 162 |
+
Full text of license texts referred to above follows (that they are
|
| 163 |
+
listed below does not necessarily imply the conditions apply to the
|
| 164 |
+
present binary release):
|
| 165 |
+
|
| 166 |
+
----
|
| 167 |
+
|
| 168 |
+
GCC RUNTIME LIBRARY EXCEPTION
|
| 169 |
+
|
| 170 |
+
Version 3.1, 31 March 2009
|
| 171 |
+
|
| 172 |
+
Copyright (C) 2009 Free Software Foundation, Inc. <http://fsf.org/>
|
| 173 |
+
|
| 174 |
+
Everyone is permitted to copy and distribute verbatim copies of this
|
| 175 |
+
license document, but changing it is not allowed.
|
| 176 |
+
|
| 177 |
+
This GCC Runtime Library Exception ("Exception") is an additional
|
| 178 |
+
permission under section 7 of the GNU General Public License, version
|
| 179 |
+
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
|
| 180 |
+
bears a notice placed by the copyright holder of the file stating that
|
| 181 |
+
the file is governed by GPLv3 along with this Exception.
|
| 182 |
+
|
| 183 |
+
When you use GCC to compile a program, GCC may combine portions of
|
| 184 |
+
certain GCC header files and runtime libraries with the compiled
|
| 185 |
+
program. The purpose of this Exception is to allow compilation of
|
| 186 |
+
non-GPL (including proprietary) programs to use, in this way, the
|
| 187 |
+
header files and runtime libraries covered by this Exception.
|
| 188 |
+
|
| 189 |
+
0. Definitions.
|
| 190 |
+
|
| 191 |
+
A file is an "Independent Module" if it either requires the Runtime
|
| 192 |
+
Library for execution after a Compilation Process, or makes use of an
|
| 193 |
+
interface provided by the Runtime Library, but is not otherwise based
|
| 194 |
+
on the Runtime Library.
|
| 195 |
+
|
| 196 |
+
"GCC" means a version of the GNU Compiler Collection, with or without
|
| 197 |
+
modifications, governed by version 3 (or a specified later version) of
|
| 198 |
+
the GNU General Public License (GPL) with the option of using any
|
| 199 |
+
subsequent versions published by the FSF.
|
| 200 |
+
|
| 201 |
+
"GPL-compatible Software" is software whose conditions of propagation,
|
| 202 |
+
modification and use would permit combination with GCC in accord with
|
| 203 |
+
the license of GCC.
|
| 204 |
+
|
| 205 |
+
"Target Code" refers to output from any compiler for a real or virtual
|
| 206 |
+
target processor architecture, in executable form or suitable for
|
| 207 |
+
input to an assembler, loader, linker and/or execution
|
| 208 |
+
phase. Notwithstanding that, Target Code does not include data in any
|
| 209 |
+
format that is used as a compiler intermediate representation, or used
|
| 210 |
+
for producing a compiler intermediate representation.
|
| 211 |
+
|
| 212 |
+
The "Compilation Process" transforms code entirely represented in
|
| 213 |
+
non-intermediate languages designed for human-written code, and/or in
|
| 214 |
+
Java Virtual Machine byte code, into Target Code. Thus, for example,
|
| 215 |
+
use of source code generators and preprocessors need not be considered
|
| 216 |
+
part of the Compilation Process, since the Compilation Process can be
|
| 217 |
+
understood as starting with the output of the generators or
|
| 218 |
+
preprocessors.
|
| 219 |
+
|
| 220 |
+
A Compilation Process is "Eligible" if it is done using GCC, alone or
|
| 221 |
+
with other GPL-compatible software, or if it is done without using any
|
| 222 |
+
work based on GCC. For example, using non-GPL-compatible Software to
|
| 223 |
+
optimize any GCC intermediate representations would not qualify as an
|
| 224 |
+
Eligible Compilation Process.
|
| 225 |
+
|
| 226 |
+
1. Grant of Additional Permission.
|
| 227 |
+
|
| 228 |
+
You have permission to propagate a work of Target Code formed by
|
| 229 |
+
combining the Runtime Library with Independent Modules, even if such
|
| 230 |
+
propagation would otherwise violate the terms of GPLv3, provided that
|
| 231 |
+
all Target Code was generated by Eligible Compilation Processes. You
|
| 232 |
+
may then convey such a combination under terms of your choice,
|
| 233 |
+
consistent with the licensing of the Independent Modules.
|
| 234 |
+
|
| 235 |
+
2. No Weakening of GCC Copyleft.
|
| 236 |
+
|
| 237 |
+
The availability of this Exception does not imply any general
|
| 238 |
+
presumption that third-party software is unaffected by the copyleft
|
| 239 |
+
requirements of the license of GCC.
|
| 240 |
+
|
| 241 |
+
----
|
| 242 |
+
|
| 243 |
+
GNU GENERAL PUBLIC LICENSE
|
| 244 |
+
Version 3, 29 June 2007
|
| 245 |
+
|
| 246 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
| 247 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 248 |
+
of this license document, but changing it is not allowed.
|
| 249 |
+
|
| 250 |
+
Preamble
|
| 251 |
+
|
| 252 |
+
The GNU General Public License is a free, copyleft license for
|
| 253 |
+
software and other kinds of works.
|
| 254 |
+
|
| 255 |
+
The licenses for most software and other practical works are designed
|
| 256 |
+
to take away your freedom to share and change the works. By contrast,
|
| 257 |
+
the GNU General Public License is intended to guarantee your freedom to
|
| 258 |
+
share and change all versions of a program--to make sure it remains free
|
| 259 |
+
software for all its users. We, the Free Software Foundation, use the
|
| 260 |
+
GNU General Public License for most of our software; it applies also to
|
| 261 |
+
any other work released this way by its authors. You can apply it to
|
| 262 |
+
your programs, too.
|
| 263 |
+
|
| 264 |
+
When we speak of free software, we are referring to freedom, not
|
| 265 |
+
price. Our General Public Licenses are designed to make sure that you
|
| 266 |
+
have the freedom to distribute copies of free software (and charge for
|
| 267 |
+
them if you wish), that you receive source code or can get it if you
|
| 268 |
+
want it, that you can change the software or use pieces of it in new
|
| 269 |
+
free programs, and that you know you can do these things.
|
| 270 |
+
|
| 271 |
+
To protect your rights, we need to prevent others from denying you
|
| 272 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
| 273 |
+
certain responsibilities if you distribute copies of the software, or if
|
| 274 |
+
you modify it: responsibilities to respect the freedom of others.
|
| 275 |
+
|
| 276 |
+
For example, if you distribute copies of such a program, whether
|
| 277 |
+
gratis or for a fee, you must pass on to the recipients the same
|
| 278 |
+
freedoms that you received. You must make sure that they, too, receive
|
| 279 |
+
or can get the source code. And you must show them these terms so they
|
| 280 |
+
know their rights.
|
| 281 |
+
|
| 282 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
| 283 |
+
(1) assert copyright on the software, and (2) offer you this License
|
| 284 |
+
giving you legal permission to copy, distribute and/or modify it.
|
| 285 |
+
|
| 286 |
+
For the developers' and authors' protection, the GPL clearly explains
|
| 287 |
+
that there is no warranty for this free software. For both users' and
|
| 288 |
+
authors' sake, the GPL requires that modified versions be marked as
|
| 289 |
+
changed, so that their problems will not be attributed erroneously to
|
| 290 |
+
authors of previous versions.
|
| 291 |
+
|
| 292 |
+
Some devices are designed to deny users access to install or run
|
| 293 |
+
modified versions of the software inside them, although the manufacturer
|
| 294 |
+
can do so. This is fundamentally incompatible with the aim of
|
| 295 |
+
protecting users' freedom to change the software. The systematic
|
| 296 |
+
pattern of such abuse occurs in the area of products for individuals to
|
| 297 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
| 298 |
+
have designed this version of the GPL to prohibit the practice for those
|
| 299 |
+
products. If such problems arise substantially in other domains, we
|
| 300 |
+
stand ready to extend this provision to those domains in future versions
|
| 301 |
+
of the GPL, as needed to protect the freedom of users.
|
| 302 |
+
|
| 303 |
+
Finally, every program is threatened constantly by software patents.
|
| 304 |
+
States should not allow patents to restrict development and use of
|
| 305 |
+
software on general-purpose computers, but in those that do, we wish to
|
| 306 |
+
avoid the special danger that patents applied to a free program could
|
| 307 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
| 308 |
+
patents cannot be used to render the program non-free.
|
| 309 |
+
|
| 310 |
+
The precise terms and conditions for copying, distribution and
|
| 311 |
+
modification follow.
|
| 312 |
+
|
| 313 |
+
TERMS AND CONDITIONS
|
| 314 |
+
|
| 315 |
+
0. Definitions.
|
| 316 |
+
|
| 317 |
+
"This License" refers to version 3 of the GNU General Public License.
|
| 318 |
+
|
| 319 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
| 320 |
+
works, such as semiconductor masks.
|
| 321 |
+
|
| 322 |
+
"The Program" refers to any copyrightable work licensed under this
|
| 323 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
| 324 |
+
"recipients" may be individuals or organizations.
|
| 325 |
+
|
| 326 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
| 327 |
+
in a fashion requiring copyright permission, other than the making of an
|
| 328 |
+
exact copy. The resulting work is called a "modified version" of the
|
| 329 |
+
earlier work or a work "based on" the earlier work.
|
| 330 |
+
|
| 331 |
+
A "covered work" means either the unmodified Program or a work based
|
| 332 |
+
on the Program.
|
| 333 |
+
|
| 334 |
+
To "propagate" a work means to do anything with it that, without
|
| 335 |
+
permission, would make you directly or secondarily liable for
|
| 336 |
+
infringement under applicable copyright law, except executing it on a
|
| 337 |
+
computer or modifying a private copy. Propagation includes copying,
|
| 338 |
+
distribution (with or without modification), making available to the
|
| 339 |
+
public, and in some countries other activities as well.
|
| 340 |
+
|
| 341 |
+
To "convey" a work means any kind of propagation that enables other
|
| 342 |
+
parties to make or receive copies. Mere interaction with a user through
|
| 343 |
+
a computer network, with no transfer of a copy, is not conveying.
|
| 344 |
+
|
| 345 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
| 346 |
+
to the extent that it includes a convenient and prominently visible
|
| 347 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
| 348 |
+
tells the user that there is no warranty for the work (except to the
|
| 349 |
+
extent that warranties are provided), that licensees may convey the
|
| 350 |
+
work under this License, and how to view a copy of this License. If
|
| 351 |
+
the interface presents a list of user commands or options, such as a
|
| 352 |
+
menu, a prominent item in the list meets this criterion.
|
| 353 |
+
|
| 354 |
+
1. Source Code.
|
| 355 |
+
|
| 356 |
+
The "source code" for a work means the preferred form of the work
|
| 357 |
+
for making modifications to it. "Object code" means any non-source
|
| 358 |
+
form of a work.
|
| 359 |
+
|
| 360 |
+
A "Standard Interface" means an interface that either is an official
|
| 361 |
+
standard defined by a recognized standards body, or, in the case of
|
| 362 |
+
interfaces specified for a particular programming language, one that
|
| 363 |
+
is widely used among developers working in that language.
|
| 364 |
+
|
| 365 |
+
The "System Libraries" of an executable work include anything, other
|
| 366 |
+
than the work as a whole, that (a) is included in the normal form of
|
| 367 |
+
packaging a Major Component, but which is not part of that Major
|
| 368 |
+
Component, and (b) serves only to enable use of the work with that
|
| 369 |
+
Major Component, or to implement a Standard Interface for which an
|
| 370 |
+
implementation is available to the public in source code form. A
|
| 371 |
+
"Major Component", in this context, means a major essential component
|
| 372 |
+
(kernel, window system, and so on) of the specific operating system
|
| 373 |
+
(if any) on which the executable work runs, or a compiler used to
|
| 374 |
+
produce the work, or an object code interpreter used to run it.
|
| 375 |
+
|
| 376 |
+
The "Corresponding Source" for a work in object code form means all
|
| 377 |
+
the source code needed to generate, install, and (for an executable
|
| 378 |
+
work) run the object code and to modify the work, including scripts to
|
| 379 |
+
control those activities. However, it does not include the work's
|
| 380 |
+
System Libraries, or general-purpose tools or generally available free
|
| 381 |
+
programs which are used unmodified in performing those activities but
|
| 382 |
+
which are not part of the work. For example, Corresponding Source
|
| 383 |
+
includes interface definition files associated with source files for
|
| 384 |
+
the work, and the source code for shared libraries and dynamically
|
| 385 |
+
linked subprograms that the work is specifically designed to require,
|
| 386 |
+
such as by intimate data communication or control flow between those
|
| 387 |
+
subprograms and other parts of the work.
|
| 388 |
+
|
| 389 |
+
The Corresponding Source need not include anything that users
|
| 390 |
+
can regenerate automatically from other parts of the Corresponding
|
| 391 |
+
Source.
|
| 392 |
+
|
| 393 |
+
The Corresponding Source for a work in source code form is that
|
| 394 |
+
same work.
|
| 395 |
+
|
| 396 |
+
2. Basic Permissions.
|
| 397 |
+
|
| 398 |
+
All rights granted under this License are granted for the term of
|
| 399 |
+
copyright on the Program, and are irrevocable provided the stated
|
| 400 |
+
conditions are met. This License explicitly affirms your unlimited
|
| 401 |
+
permission to run the unmodified Program. The output from running a
|
| 402 |
+
covered work is covered by this License only if the output, given its
|
| 403 |
+
content, constitutes a covered work. This License acknowledges your
|
| 404 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
| 405 |
+
|
| 406 |
+
You may make, run and propagate covered works that you do not
|
| 407 |
+
convey, without conditions so long as your license otherwise remains
|
| 408 |
+
in force. You may convey covered works to others for the sole purpose
|
| 409 |
+
of having them make modifications exclusively for you, or provide you
|
| 410 |
+
with facilities for running those works, provided that you comply with
|
| 411 |
+
the terms of this License in conveying all material for which you do
|
| 412 |
+
not control copyright. Those thus making or running the covered works
|
| 413 |
+
for you must do so exclusively on your behalf, under your direction
|
| 414 |
+
and control, on terms that prohibit them from making any copies of
|
| 415 |
+
your copyrighted material outside their relationship with you.
|
| 416 |
+
|
| 417 |
+
Conveying under any other circumstances is permitted solely under
|
| 418 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
| 419 |
+
makes it unnecessary.
|
| 420 |
+
|
| 421 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
| 422 |
+
|
| 423 |
+
No covered work shall be deemed part of an effective technological
|
| 424 |
+
measure under any applicable law fulfilling obligations under article
|
| 425 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
| 426 |
+
similar laws prohibiting or restricting circumvention of such
|
| 427 |
+
measures.
|
| 428 |
+
|
| 429 |
+
When you convey a covered work, you waive any legal power to forbid
|
| 430 |
+
circumvention of technological measures to the extent such circumvention
|
| 431 |
+
is effected by exercising rights under this License with respect to
|
| 432 |
+
the covered work, and you disclaim any intention to limit operation or
|
| 433 |
+
modification of the work as a means of enforcing, against the work's
|
| 434 |
+
users, your or third parties' legal rights to forbid circumvention of
|
| 435 |
+
technological measures.
|
| 436 |
+
|
| 437 |
+
4. Conveying Verbatim Copies.
|
| 438 |
+
|
| 439 |
+
You may convey verbatim copies of the Program's source code as you
|
| 440 |
+
receive it, in any medium, provided that you conspicuously and
|
| 441 |
+
appropriately publish on each copy an appropriate copyright notice;
|
| 442 |
+
keep intact all notices stating that this License and any
|
| 443 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
| 444 |
+
keep intact all notices of the absence of any warranty; and give all
|
| 445 |
+
recipients a copy of this License along with the Program.
|
| 446 |
+
|
| 447 |
+
You may charge any price or no price for each copy that you convey,
|
| 448 |
+
and you may offer support or warranty protection for a fee.
|
| 449 |
+
|
| 450 |
+
5. Conveying Modified Source Versions.
|
| 451 |
+
|
| 452 |
+
You may convey a work based on the Program, or the modifications to
|
| 453 |
+
produce it from the Program, in the form of source code under the
|
| 454 |
+
terms of section 4, provided that you also meet all of these conditions:
|
| 455 |
+
|
| 456 |
+
a) The work must carry prominent notices stating that you modified
|
| 457 |
+
it, and giving a relevant date.
|
| 458 |
+
|
| 459 |
+
b) The work must carry prominent notices stating that it is
|
| 460 |
+
released under this License and any conditions added under section
|
| 461 |
+
7. This requirement modifies the requirement in section 4 to
|
| 462 |
+
"keep intact all notices".
|
| 463 |
+
|
| 464 |
+
c) You must license the entire work, as a whole, under this
|
| 465 |
+
License to anyone who comes into possession of a copy. This
|
| 466 |
+
License will therefore apply, along with any applicable section 7
|
| 467 |
+
additional terms, to the whole of the work, and all its parts,
|
| 468 |
+
regardless of how they are packaged. This License gives no
|
| 469 |
+
permission to license the work in any other way, but it does not
|
| 470 |
+
invalidate such permission if you have separately received it.
|
| 471 |
+
|
| 472 |
+
d) If the work has interactive user interfaces, each must display
|
| 473 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
| 474 |
+
interfaces that do not display Appropriate Legal Notices, your
|
| 475 |
+
work need not make them do so.
|
| 476 |
+
|
| 477 |
+
A compilation of a covered work with other separate and independent
|
| 478 |
+
works, which are not by their nature extensions of the covered work,
|
| 479 |
+
and which are not combined with it such as to form a larger program,
|
| 480 |
+
in or on a volume of a storage or distribution medium, is called an
|
| 481 |
+
"aggregate" if the compilation and its resulting copyright are not
|
| 482 |
+
used to limit the access or legal rights of the compilation's users
|
| 483 |
+
beyond what the individual works permit. Inclusion of a covered work
|
| 484 |
+
in an aggregate does not cause this License to apply to the other
|
| 485 |
+
parts of the aggregate.
|
| 486 |
+
|
| 487 |
+
6. Conveying Non-Source Forms.
|
| 488 |
+
|
| 489 |
+
You may convey a covered work in object code form under the terms
|
| 490 |
+
of sections 4 and 5, provided that you also convey the
|
| 491 |
+
machine-readable Corresponding Source under the terms of this License,
|
| 492 |
+
in one of these ways:
|
| 493 |
+
|
| 494 |
+
a) Convey the object code in, or embodied in, a physical product
|
| 495 |
+
(including a physical distribution medium), accompanied by the
|
| 496 |
+
Corresponding Source fixed on a durable physical medium
|
| 497 |
+
customarily used for software interchange.
|
| 498 |
+
|
| 499 |
+
b) Convey the object code in, or embodied in, a physical product
|
| 500 |
+
(including a physical distribution medium), accompanied by a
|
| 501 |
+
written offer, valid for at least three years and valid for as
|
| 502 |
+
long as you offer spare parts or customer support for that product
|
| 503 |
+
model, to give anyone who possesses the object code either (1) a
|
| 504 |
+
copy of the Corresponding Source for all the software in the
|
| 505 |
+
product that is covered by this License, on a durable physical
|
| 506 |
+
medium customarily used for software interchange, for a price no
|
| 507 |
+
more than your reasonable cost of physically performing this
|
| 508 |
+
conveying of source, or (2) access to copy the
|
| 509 |
+
Corresponding Source from a network server at no charge.
|
| 510 |
+
|
| 511 |
+
c) Convey individual copies of the object code with a copy of the
|
| 512 |
+
written offer to provide the Corresponding Source. This
|
| 513 |
+
alternative is allowed only occasionally and noncommercially, and
|
| 514 |
+
only if you received the object code with such an offer, in accord
|
| 515 |
+
with subsection 6b.
|
| 516 |
+
|
| 517 |
+
d) Convey the object code by offering access from a designated
|
| 518 |
+
place (gratis or for a charge), and offer equivalent access to the
|
| 519 |
+
Corresponding Source in the same way through the same place at no
|
| 520 |
+
further charge. You need not require recipients to copy the
|
| 521 |
+
Corresponding Source along with the object code. If the place to
|
| 522 |
+
copy the object code is a network server, the Corresponding Source
|
| 523 |
+
may be on a different server (operated by you or a third party)
|
| 524 |
+
that supports equivalent copying facilities, provided you maintain
|
| 525 |
+
clear directions next to the object code saying where to find the
|
| 526 |
+
Corresponding Source. Regardless of what server hosts the
|
| 527 |
+
Corresponding Source, you remain obligated to ensure that it is
|
| 528 |
+
available for as long as needed to satisfy these requirements.
|
| 529 |
+
|
| 530 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
| 531 |
+
you inform other peers where the object code and Corresponding
|
| 532 |
+
Source of the work are being offered to the general public at no
|
| 533 |
+
charge under subsection 6d.
|
| 534 |
+
|
| 535 |
+
A separable portion of the object code, whose source code is excluded
|
| 536 |
+
from the Corresponding Source as a System Library, need not be
|
| 537 |
+
included in conveying the object code work.
|
| 538 |
+
|
| 539 |
+
A "User Product" is either (1) a "consumer product", which means any
|
| 540 |
+
tangible personal property which is normally used for personal, family,
|
| 541 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
| 542 |
+
into a dwelling. In determining whether a product is a consumer product,
|
| 543 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
| 544 |
+
product received by a particular user, "normally used" refers to a
|
| 545 |
+
typical or common use of that class of product, regardless of the status
|
| 546 |
+
of the particular user or of the way in which the particular user
|
| 547 |
+
actually uses, or expects or is expected to use, the product. A product
|
| 548 |
+
is a consumer product regardless of whether the product has substantial
|
| 549 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
| 550 |
+
the only significant mode of use of the product.
|
| 551 |
+
|
| 552 |
+
"Installation Information" for a User Product means any methods,
|
| 553 |
+
procedures, authorization keys, or other information required to install
|
| 554 |
+
and execute modified versions of a covered work in that User Product from
|
| 555 |
+
a modified version of its Corresponding Source. The information must
|
| 556 |
+
suffice to ensure that the continued functioning of the modified object
|
| 557 |
+
code is in no case prevented or interfered with solely because
|
| 558 |
+
modification has been made.
|
| 559 |
+
|
| 560 |
+
If you convey an object code work under this section in, or with, or
|
| 561 |
+
specifically for use in, a User Product, and the conveying occurs as
|
| 562 |
+
part of a transaction in which the right of possession and use of the
|
| 563 |
+
User Product is transferred to the recipient in perpetuity or for a
|
| 564 |
+
fixed term (regardless of how the transaction is characterized), the
|
| 565 |
+
Corresponding Source conveyed under this section must be accompanied
|
| 566 |
+
by the Installation Information. But this requirement does not apply
|
| 567 |
+
if neither you nor any third party retains the ability to install
|
| 568 |
+
modified object code on the User Product (for example, the work has
|
| 569 |
+
been installed in ROM).
|
| 570 |
+
|
| 571 |
+
The requirement to provide Installation Information does not include a
|
| 572 |
+
requirement to continue to provide support service, warranty, or updates
|
| 573 |
+
for a work that has been modified or installed by the recipient, or for
|
| 574 |
+
the User Product in which it has been modified or installed. Access to a
|
| 575 |
+
network may be denied when the modification itself materially and
|
| 576 |
+
adversely affects the operation of the network or violates the rules and
|
| 577 |
+
protocols for communication across the network.
|
| 578 |
+
|
| 579 |
+
Corresponding Source conveyed, and Installation Information provided,
|
| 580 |
+
in accord with this section must be in a format that is publicly
|
| 581 |
+
documented (and with an implementation available to the public in
|
| 582 |
+
source code form), and must require no special password or key for
|
| 583 |
+
unpacking, reading or copying.
|
| 584 |
+
|
| 585 |
+
7. Additional Terms.
|
| 586 |
+
|
| 587 |
+
"Additional permissions" are terms that supplement the terms of this
|
| 588 |
+
License by making exceptions from one or more of its conditions.
|
| 589 |
+
Additional permissions that are applicable to the entire Program shall
|
| 590 |
+
be treated as though they were included in this License, to the extent
|
| 591 |
+
that they are valid under applicable law. If additional permissions
|
| 592 |
+
apply only to part of the Program, that part may be used separately
|
| 593 |
+
under those permissions, but the entire Program remains governed by
|
| 594 |
+
this License without regard to the additional permissions.
|
| 595 |
+
|
| 596 |
+
When you convey a copy of a covered work, you may at your option
|
| 597 |
+
remove any additional permissions from that copy, or from any part of
|
| 598 |
+
it. (Additional permissions may be written to require their own
|
| 599 |
+
removal in certain cases when you modify the work.) You may place
|
| 600 |
+
additional permissions on material, added by you to a covered work,
|
| 601 |
+
for which you have or can give appropriate copyright permission.
|
| 602 |
+
|
| 603 |
+
Notwithstanding any other provision of this License, for material you
|
| 604 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
| 605 |
+
that material) supplement the terms of this License with terms:
|
| 606 |
+
|
| 607 |
+
a) Disclaiming warranty or limiting liability differently from the
|
| 608 |
+
terms of sections 15 and 16 of this License; or
|
| 609 |
+
|
| 610 |
+
b) Requiring preservation of specified reasonable legal notices or
|
| 611 |
+
author attributions in that material or in the Appropriate Legal
|
| 612 |
+
Notices displayed by works containing it; or
|
| 613 |
+
|
| 614 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
| 615 |
+
requiring that modified versions of such material be marked in
|
| 616 |
+
reasonable ways as different from the original version; or
|
| 617 |
+
|
| 618 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
| 619 |
+
authors of the material; or
|
| 620 |
+
|
| 621 |
+
e) Declining to grant rights under trademark law for use of some
|
| 622 |
+
trade names, trademarks, or service marks; or
|
| 623 |
+
|
| 624 |
+
f) Requiring indemnification of licensors and authors of that
|
| 625 |
+
material by anyone who conveys the material (or modified versions of
|
| 626 |
+
it) with contractual assumptions of liability to the recipient, for
|
| 627 |
+
any liability that these contractual assumptions directly impose on
|
| 628 |
+
those licensors and authors.
|
| 629 |
+
|
| 630 |
+
All other non-permissive additional terms are considered "further
|
| 631 |
+
restrictions" within the meaning of section 10. If the Program as you
|
| 632 |
+
received it, or any part of it, contains a notice stating that it is
|
| 633 |
+
governed by this License along with a term that is a further
|
| 634 |
+
restriction, you may remove that term. If a license document contains
|
| 635 |
+
a further restriction but permits relicensing or conveying under this
|
| 636 |
+
License, you may add to a covered work material governed by the terms
|
| 637 |
+
of that license document, provided that the further restriction does
|
| 638 |
+
not survive such relicensing or conveying.
|
| 639 |
+
|
| 640 |
+
If you add terms to a covered work in accord with this section, you
|
| 641 |
+
must place, in the relevant source files, a statement of the
|
| 642 |
+
additional terms that apply to those files, or a notice indicating
|
| 643 |
+
where to find the applicable terms.
|
| 644 |
+
|
| 645 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
| 646 |
+
form of a separately written license, or stated as exceptions;
|
| 647 |
+
the above requirements apply either way.
|
| 648 |
+
|
| 649 |
+
8. Termination.
|
| 650 |
+
|
| 651 |
+
You may not propagate or modify a covered work except as expressly
|
| 652 |
+
provided under this License. Any attempt otherwise to propagate or
|
| 653 |
+
modify it is void, and will automatically terminate your rights under
|
| 654 |
+
this License (including any patent licenses granted under the third
|
| 655 |
+
paragraph of section 11).
|
| 656 |
+
|
| 657 |
+
However, if you cease all violation of this License, then your
|
| 658 |
+
license from a particular copyright holder is reinstated (a)
|
| 659 |
+
provisionally, unless and until the copyright holder explicitly and
|
| 660 |
+
finally terminates your license, and (b) permanently, if the copyright
|
| 661 |
+
holder fails to notify you of the violation by some reasonable means
|
| 662 |
+
prior to 60 days after the cessation.
|
| 663 |
+
|
| 664 |
+
Moreover, your license from a particular copyright holder is
|
| 665 |
+
reinstated permanently if the copyright holder notifies you of the
|
| 666 |
+
violation by some reasonable means, this is the first time you have
|
| 667 |
+
received notice of violation of this License (for any work) from that
|
| 668 |
+
copyright holder, and you cure the violation prior to 30 days after
|
| 669 |
+
your receipt of the notice.
|
| 670 |
+
|
| 671 |
+
Termination of your rights under this section does not terminate the
|
| 672 |
+
licenses of parties who have received copies or rights from you under
|
| 673 |
+
this License. If your rights have been terminated and not permanently
|
| 674 |
+
reinstated, you do not qualify to receive new licenses for the same
|
| 675 |
+
material under section 10.
|
| 676 |
+
|
| 677 |
+
9. Acceptance Not Required for Having Copies.
|
| 678 |
+
|
| 679 |
+
You are not required to accept this License in order to receive or
|
| 680 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
| 681 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
| 682 |
+
to receive a copy likewise does not require acceptance. However,
|
| 683 |
+
nothing other than this License grants you permission to propagate or
|
| 684 |
+
modify any covered work. These actions infringe copyright if you do
|
| 685 |
+
not accept this License. Therefore, by modifying or propagating a
|
| 686 |
+
covered work, you indicate your acceptance of this License to do so.
|
| 687 |
+
|
| 688 |
+
10. Automatic Licensing of Downstream Recipients.
|
| 689 |
+
|
| 690 |
+
Each time you convey a covered work, the recipient automatically
|
| 691 |
+
receives a license from the original licensors, to run, modify and
|
| 692 |
+
propagate that work, subject to this License. You are not responsible
|
| 693 |
+
for enforcing compliance by third parties with this License.
|
| 694 |
+
|
| 695 |
+
An "entity transaction" is a transaction transferring control of an
|
| 696 |
+
organization, or substantially all assets of one, or subdividing an
|
| 697 |
+
organization, or merging organizations. If propagation of a covered
|
| 698 |
+
work results from an entity transaction, each party to that
|
| 699 |
+
transaction who receives a copy of the work also receives whatever
|
| 700 |
+
licenses to the work the party's predecessor in interest had or could
|
| 701 |
+
give under the previous paragraph, plus a right to possession of the
|
| 702 |
+
Corresponding Source of the work from the predecessor in interest, if
|
| 703 |
+
the predecessor has it or can get it with reasonable efforts.
|
| 704 |
+
|
| 705 |
+
You may not impose any further restrictions on the exercise of the
|
| 706 |
+
rights granted or affirmed under this License. For example, you may
|
| 707 |
+
not impose a license fee, royalty, or other charge for exercise of
|
| 708 |
+
rights granted under this License, and you may not initiate litigation
|
| 709 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
| 710 |
+
any patent claim is infringed by making, using, selling, offering for
|
| 711 |
+
sale, or importing the Program or any portion of it.
|
| 712 |
+
|
| 713 |
+
11. Patents.
|
| 714 |
+
|
| 715 |
+
A "contributor" is a copyright holder who authorizes use under this
|
| 716 |
+
License of the Program or a work on which the Program is based. The
|
| 717 |
+
work thus licensed is called the contributor's "contributor version".
|
| 718 |
+
|
| 719 |
+
A contributor's "essential patent claims" are all patent claims
|
| 720 |
+
owned or controlled by the contributor, whether already acquired or
|
| 721 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
| 722 |
+
by this License, of making, using, or selling its contributor version,
|
| 723 |
+
but do not include claims that would be infringed only as a
|
| 724 |
+
consequence of further modification of the contributor version. For
|
| 725 |
+
purposes of this definition, "control" includes the right to grant
|
| 726 |
+
patent sublicenses in a manner consistent with the requirements of
|
| 727 |
+
this License.
|
| 728 |
+
|
| 729 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
| 730 |
+
patent license under the contributor's essential patent claims, to
|
| 731 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
| 732 |
+
propagate the contents of its contributor version.
|
| 733 |
+
|
| 734 |
+
In the following three paragraphs, a "patent license" is any express
|
| 735 |
+
agreement or commitment, however denominated, not to enforce a patent
|
| 736 |
+
(such as an express permission to practice a patent or covenant not to
|
| 737 |
+
sue for patent infringement). To "grant" such a patent license to a
|
| 738 |
+
party means to make such an agreement or commitment not to enforce a
|
| 739 |
+
patent against the party.
|
| 740 |
+
|
| 741 |
+
If you convey a covered work, knowingly relying on a patent license,
|
| 742 |
+
and the Corresponding Source of the work is not available for anyone
|
| 743 |
+
to copy, free of charge and under the terms of this License, through a
|
| 744 |
+
publicly available network server or other readily accessible means,
|
| 745 |
+
then you must either (1) cause the Corresponding Source to be so
|
| 746 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
| 747 |
+
patent license for this particular work, or (3) arrange, in a manner
|
| 748 |
+
consistent with the requirements of this License, to extend the patent
|
| 749 |
+
license to downstream recipients. "Knowingly relying" means you have
|
| 750 |
+
actual knowledge that, but for the patent license, your conveying the
|
| 751 |
+
covered work in a country, or your recipient's use of the covered work
|
| 752 |
+
in a country, would infringe one or more identifiable patents in that
|
| 753 |
+
country that you have reason to believe are valid.
|
| 754 |
+
|
| 755 |
+
If, pursuant to or in connection with a single transaction or
|
| 756 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
| 757 |
+
covered work, and grant a patent license to some of the parties
|
| 758 |
+
receiving the covered work authorizing them to use, propagate, modify
|
| 759 |
+
or convey a specific copy of the covered work, then the patent license
|
| 760 |
+
you grant is automatically extended to all recipients of the covered
|
| 761 |
+
work and works based on it.
|
| 762 |
+
|
| 763 |
+
A patent license is "discriminatory" if it does not include within
|
| 764 |
+
the scope of its coverage, prohibits the exercise of, or is
|
| 765 |
+
conditioned on the non-exercise of one or more of the rights that are
|
| 766 |
+
specifically granted under this License. You may not convey a covered
|
| 767 |
+
work if you are a party to an arrangement with a third party that is
|
| 768 |
+
in the business of distributing software, under which you make payment
|
| 769 |
+
to the third party based on the extent of your activity of conveying
|
| 770 |
+
the work, and under which the third party grants, to any of the
|
| 771 |
+
parties who would receive the covered work from you, a discriminatory
|
| 772 |
+
patent license (a) in connection with copies of the covered work
|
| 773 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
| 774 |
+
for and in connection with specific products or compilations that
|
| 775 |
+
contain the covered work, unless you entered into that arrangement,
|
| 776 |
+
or that patent license was granted, prior to 28 March 2007.
|
| 777 |
+
|
| 778 |
+
Nothing in this License shall be construed as excluding or limiting
|
| 779 |
+
any implied license or other defenses to infringement that may
|
| 780 |
+
otherwise be available to you under applicable patent law.
|
| 781 |
+
|
| 782 |
+
12. No Surrender of Others' Freedom.
|
| 783 |
+
|
| 784 |
+
If conditions are imposed on you (whether by court order, agreement or
|
| 785 |
+
otherwise) that contradict the conditions of this License, they do not
|
| 786 |
+
excuse you from the conditions of this License. If you cannot convey a
|
| 787 |
+
covered work so as to satisfy simultaneously your obligations under this
|
| 788 |
+
License and any other pertinent obligations, then as a consequence you may
|
| 789 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
| 790 |
+
to collect a royalty for further conveying from those to whom you convey
|
| 791 |
+
the Program, the only way you could satisfy both those terms and this
|
| 792 |
+
License would be to refrain entirely from conveying the Program.
|
| 793 |
+
|
| 794 |
+
13. Use with the GNU Affero General Public License.
|
| 795 |
+
|
| 796 |
+
Notwithstanding any other provision of this License, you have
|
| 797 |
+
permission to link or combine any covered work with a work licensed
|
| 798 |
+
under version 3 of the GNU Affero General Public License into a single
|
| 799 |
+
combined work, and to convey the resulting work. The terms of this
|
| 800 |
+
License will continue to apply to the part which is the covered work,
|
| 801 |
+
but the special requirements of the GNU Affero General Public License,
|
| 802 |
+
section 13, concerning interaction through a network will apply to the
|
| 803 |
+
combination as such.
|
| 804 |
+
|
| 805 |
+
14. Revised Versions of this License.
|
| 806 |
+
|
| 807 |
+
The Free Software Foundation may publish revised and/or new versions of
|
| 808 |
+
the GNU General Public License from time to time. Such new versions will
|
| 809 |
+
be similar in spirit to the present version, but may differ in detail to
|
| 810 |
+
address new problems or concerns.
|
| 811 |
+
|
| 812 |
+
Each version is given a distinguishing version number. If the
|
| 813 |
+
Program specifies that a certain numbered version of the GNU General
|
| 814 |
+
Public License "or any later version" applies to it, you have the
|
| 815 |
+
option of following the terms and conditions either of that numbered
|
| 816 |
+
version or of any later version published by the Free Software
|
| 817 |
+
Foundation. If the Program does not specify a version number of the
|
| 818 |
+
GNU General Public License, you may choose any version ever published
|
| 819 |
+
by the Free Software Foundation.
|
| 820 |
+
|
| 821 |
+
If the Program specifies that a proxy can decide which future
|
| 822 |
+
versions of the GNU General Public License can be used, that proxy's
|
| 823 |
+
public statement of acceptance of a version permanently authorizes you
|
| 824 |
+
to choose that version for the Program.
|
| 825 |
+
|
| 826 |
+
Later license versions may give you additional or different
|
| 827 |
+
permissions. However, no additional obligations are imposed on any
|
| 828 |
+
author or copyright holder as a result of your choosing to follow a
|
| 829 |
+
later version.
|
| 830 |
+
|
| 831 |
+
15. Disclaimer of Warranty.
|
| 832 |
+
|
| 833 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
| 834 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
| 835 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
| 836 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
| 837 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
| 838 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
| 839 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
| 840 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
| 841 |
+
|
| 842 |
+
16. Limitation of Liability.
|
| 843 |
+
|
| 844 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 845 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
| 846 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
| 847 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
| 848 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
| 849 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
| 850 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
| 851 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
| 852 |
+
SUCH DAMAGES.
|
| 853 |
+
|
| 854 |
+
17. Interpretation of Sections 15 and 16.
|
| 855 |
+
|
| 856 |
+
If the disclaimer of warranty and limitation of liability provided
|
| 857 |
+
above cannot be given local legal effect according to their terms,
|
| 858 |
+
reviewing courts shall apply local law that most closely approximates
|
| 859 |
+
an absolute waiver of all civil liability in connection with the
|
| 860 |
+
Program, unless a warranty or assumption of liability accompanies a
|
| 861 |
+
copy of the Program in return for a fee.
|
| 862 |
+
|
| 863 |
+
END OF TERMS AND CONDITIONS
|
| 864 |
+
|
| 865 |
+
How to Apply These Terms to Your New Programs
|
| 866 |
+
|
| 867 |
+
If you develop a new program, and you want it to be of the greatest
|
| 868 |
+
possible use to the public, the best way to achieve this is to make it
|
| 869 |
+
free software which everyone can redistribute and change under these terms.
|
| 870 |
+
|
| 871 |
+
To do so, attach the following notices to the program. It is safest
|
| 872 |
+
to attach them to the start of each source file to most effectively
|
| 873 |
+
state the exclusion of warranty; and each file should have at least
|
| 874 |
+
the "copyright" line and a pointer to where the full notice is found.
|
| 875 |
+
|
| 876 |
+
<one line to give the program's name and a brief idea of what it does.>
|
| 877 |
+
Copyright (C) <year> <name of author>
|
| 878 |
+
|
| 879 |
+
This program is free software: you can redistribute it and/or modify
|
| 880 |
+
it under the terms of the GNU General Public License as published by
|
| 881 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 882 |
+
(at your option) any later version.
|
| 883 |
+
|
| 884 |
+
This program is distributed in the hope that it will be useful,
|
| 885 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 886 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 887 |
+
GNU General Public License for more details.
|
| 888 |
+
|
| 889 |
+
You should have received a copy of the GNU General Public License
|
| 890 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 891 |
+
|
| 892 |
+
Also add information on how to contact you by electronic and paper mail.
|
| 893 |
+
|
| 894 |
+
If the program does terminal interaction, make it output a short
|
| 895 |
+
notice like this when it starts in an interactive mode:
|
| 896 |
+
|
| 897 |
+
<program> Copyright (C) <year> <name of author>
|
| 898 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
| 899 |
+
This is free software, and you are welcome to redistribute it
|
| 900 |
+
under certain conditions; type `show c' for details.
|
| 901 |
+
|
| 902 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
| 903 |
+
parts of the General Public License. Of course, your program's commands
|
| 904 |
+
might be different; for a GUI interface, you would use an "about box".
|
| 905 |
+
|
| 906 |
+
You should also get your employer (if you work as a programmer) or school,
|
| 907 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
| 908 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
| 909 |
+
<http://www.gnu.org/licenses/>.
|
| 910 |
+
|
| 911 |
+
The GNU General Public License does not permit incorporating your program
|
| 912 |
+
into proprietary programs. If your program is a subroutine library, you
|
| 913 |
+
may consider it more useful to permit linking proprietary applications with
|
| 914 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
| 915 |
+
Public License instead of this License. But first, please read
|
| 916 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
| 917 |
+
|
| 918 |
+
|
| 919 |
+
Name: libquadmath
|
| 920 |
+
Files: scipy.libs/libquadmath*.so
|
| 921 |
+
Description: dynamically linked to files compiled with gcc
|
| 922 |
+
Availability: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libquadmath
|
| 923 |
+
License: LGPL-2.1-or-later
|
| 924 |
+
|
| 925 |
+
GCC Quad-Precision Math Library
|
| 926 |
+
Copyright (C) 2010-2019 Free Software Foundation, Inc.
|
| 927 |
+
Written by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
| 928 |
+
|
| 929 |
+
This file is part of the libquadmath library.
|
| 930 |
+
Libquadmath is free software; you can redistribute it and/or
|
| 931 |
+
modify it under the terms of the GNU Library General Public
|
| 932 |
+
License as published by the Free Software Foundation; either
|
| 933 |
+
version 2.1 of the License, or (at your option) any later version.
|
| 934 |
+
|
| 935 |
+
Libquadmath is distributed in the hope that it will be useful,
|
| 936 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 937 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 938 |
+
Lesser General Public License for more details.
|
| 939 |
+
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
|
| 940 |
+
|
| 941 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 942 |
+
Classifier: Intended Audience :: Science/Research
|
| 943 |
+
Classifier: Intended Audience :: Developers
|
| 944 |
+
Classifier: License :: OSI Approved :: BSD License
|
| 945 |
+
Classifier: Programming Language :: C
|
| 946 |
+
Classifier: Programming Language :: Python
|
| 947 |
+
Classifier: Programming Language :: Python :: 3
|
| 948 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 949 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 950 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 951 |
+
Classifier: Programming Language :: Python :: 3.14
|
| 952 |
+
Classifier: Topic :: Software Development :: Libraries
|
| 953 |
+
Classifier: Topic :: Scientific/Engineering
|
| 954 |
+
Classifier: Operating System :: Microsoft :: Windows
|
| 955 |
+
Classifier: Operating System :: POSIX :: Linux
|
| 956 |
+
Classifier: Operating System :: POSIX
|
| 957 |
+
Classifier: Operating System :: Unix
|
| 958 |
+
Classifier: Operating System :: MacOS
|
| 959 |
+
Project-URL: homepage, https://scipy.org/
|
| 960 |
+
Project-URL: documentation, https://docs.scipy.org/doc/scipy/
|
| 961 |
+
Project-URL: source, https://github.com/scipy/scipy
|
| 962 |
+
Project-URL: download, https://github.com/scipy/scipy/releases
|
| 963 |
+
Project-URL: tracker, https://github.com/scipy/scipy/issues
|
| 964 |
+
Requires-Python: >=3.11
|
| 965 |
+
Requires-Dist: numpy<2.7,>=1.26.4
|
| 966 |
+
Provides-Extra: test
|
| 967 |
+
Requires-Dist: pytest>=8.0.0; extra == "test"
|
| 968 |
+
Requires-Dist: pytest-cov; extra == "test"
|
| 969 |
+
Requires-Dist: pytest-timeout; extra == "test"
|
| 970 |
+
Requires-Dist: pytest-xdist; extra == "test"
|
| 971 |
+
Requires-Dist: asv; extra == "test"
|
| 972 |
+
Requires-Dist: mpmath; extra == "test"
|
| 973 |
+
Requires-Dist: gmpy2; extra == "test"
|
| 974 |
+
Requires-Dist: threadpoolctl; extra == "test"
|
| 975 |
+
Requires-Dist: scikit-umfpack; extra == "test"
|
| 976 |
+
Requires-Dist: pooch; extra == "test"
|
| 977 |
+
Requires-Dist: hypothesis>=6.30; extra == "test"
|
| 978 |
+
Requires-Dist: array-api-strict>=2.3.1; extra == "test"
|
| 979 |
+
Requires-Dist: Cython; extra == "test"
|
| 980 |
+
Requires-Dist: meson; extra == "test"
|
| 981 |
+
Requires-Dist: ninja; sys_platform != "emscripten" and extra == "test"
|
| 982 |
+
Provides-Extra: doc
|
| 983 |
+
Requires-Dist: sphinx<8.2.0,>=5.0.0; extra == "doc"
|
| 984 |
+
Requires-Dist: intersphinx_registry; extra == "doc"
|
| 985 |
+
Requires-Dist: pydata-sphinx-theme>=0.15.2; extra == "doc"
|
| 986 |
+
Requires-Dist: sphinx-copybutton; extra == "doc"
|
| 987 |
+
Requires-Dist: sphinx-design>=0.4.0; extra == "doc"
|
| 988 |
+
Requires-Dist: matplotlib>=3.5; extra == "doc"
|
| 989 |
+
Requires-Dist: numpydoc; extra == "doc"
|
| 990 |
+
Requires-Dist: jupytext; extra == "doc"
|
| 991 |
+
Requires-Dist: myst-nb>=1.2.0; extra == "doc"
|
| 992 |
+
Requires-Dist: pooch; extra == "doc"
|
| 993 |
+
Requires-Dist: jupyterlite-sphinx>=0.19.1; extra == "doc"
|
| 994 |
+
Requires-Dist: jupyterlite-pyodide-kernel; extra == "doc"
|
| 995 |
+
Requires-Dist: linkify-it-py; extra == "doc"
|
| 996 |
+
Requires-Dist: tabulate; extra == "doc"
|
| 997 |
+
Provides-Extra: dev
|
| 998 |
+
Requires-Dist: click<8.3.0; extra == "dev"
|
| 999 |
+
Requires-Dist: spin; extra == "dev"
|
| 1000 |
+
Requires-Dist: mypy==1.10.0; extra == "dev"
|
| 1001 |
+
Requires-Dist: typing_extensions; extra == "dev"
|
| 1002 |
+
Requires-Dist: types-psutil; extra == "dev"
|
| 1003 |
+
Requires-Dist: pycodestyle; extra == "dev"
|
| 1004 |
+
Requires-Dist: ruff>=0.12.0; extra == "dev"
|
| 1005 |
+
Requires-Dist: cython-lint>=0.12.2; extra == "dev"
|
| 1006 |
+
Description-Content-Type: text/x-rst
|
| 1007 |
+
|
| 1008 |
+
.. image:: https://raw.githubusercontent.com/scipy/scipy/main/doc/source/_static/logo.svg
|
| 1009 |
+
:target: https://scipy.org
|
| 1010 |
+
:width: 110
|
| 1011 |
+
:height: 110
|
| 1012 |
+
:align: left
|
| 1013 |
+
|
| 1014 |
+
.. image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
|
| 1015 |
+
:target: https://numfocus.org
|
| 1016 |
+
|
| 1017 |
+
.. image:: https://img.shields.io/pypi/dm/scipy.svg?label=Pypi%20downloads
|
| 1018 |
+
:target: https://pypi.org/project/scipy/
|
| 1019 |
+
|
| 1020 |
+
.. image:: https://img.shields.io/conda/dn/conda-forge/scipy.svg?label=Conda%20downloads
|
| 1021 |
+
:target: https://anaconda.org/conda-forge/scipy
|
| 1022 |
+
|
| 1023 |
+
.. image:: https://img.shields.io/badge/stackoverflow-Ask%20questions-blue.svg
|
| 1024 |
+
:target: https://stackoverflow.com/questions/tagged/scipy
|
| 1025 |
+
|
| 1026 |
+
.. image:: https://img.shields.io/badge/DOI-10.1038%2Fs41592--019--0686--2-blue.svg
|
| 1027 |
+
:target: https://www.nature.com/articles/s41592-019-0686-2
|
| 1028 |
+
|
| 1029 |
+
.. image:: https://insights.linuxfoundation.org/api/badge/health-score?project=scipy
|
| 1030 |
+
:target: https://insights.linuxfoundation.org/project/scipy
|
| 1031 |
+
|
| 1032 |
+
SciPy (pronounced "Sigh Pie") is an open-source software for mathematics,
|
| 1033 |
+
science, and engineering. It includes modules for statistics, optimization,
|
| 1034 |
+
integration, linear algebra, Fourier transforms, signal and image processing,
|
| 1035 |
+
ODE solvers, and more.
|
| 1036 |
+
|
| 1037 |
+
- **Website:** https://scipy.org
|
| 1038 |
+
- **Documentation:** https://docs.scipy.org/doc/scipy/
|
| 1039 |
+
- **Development version of the documentation:** https://scipy.github.io/devdocs
|
| 1040 |
+
- **SciPy development forum:** https://discuss.scientific-python.org/c/contributor/scipy
|
| 1041 |
+
- **Stack Overflow:** https://stackoverflow.com/questions/tagged/scipy
|
| 1042 |
+
- **Source code:** https://github.com/scipy/scipy
|
| 1043 |
+
- **Contributing:** https://scipy.github.io/devdocs/dev/index.html
|
| 1044 |
+
- **Bug reports:** https://github.com/scipy/scipy/issues
|
| 1045 |
+
- **Code of Conduct:** https://docs.scipy.org/doc/scipy/dev/conduct/code_of_conduct.html
|
| 1046 |
+
- **Report a security vulnerability:** https://tidelift.com/docs/security
|
| 1047 |
+
- **Citing in your work:** https://www.scipy.org/citing-scipy/
|
| 1048 |
+
|
| 1049 |
+
SciPy is built to work with
|
| 1050 |
+
NumPy arrays, and provides many user-friendly and efficient numerical routines,
|
| 1051 |
+
such as routines for numerical integration and optimization. Together, they
|
| 1052 |
+
run on all popular operating systems, are quick to install, and are free of
|
| 1053 |
+
charge. NumPy and SciPy are easy to use, but powerful enough to be depended
|
| 1054 |
+
upon by some of the world's leading scientists and engineers. If you need to
|
| 1055 |
+
manipulate numbers on a computer and display or publish the results, give
|
| 1056 |
+
SciPy a try!
|
| 1057 |
+
|
| 1058 |
+
For the installation instructions, see `our install
|
| 1059 |
+
guide <https://scipy.org/install/>`__.
|
| 1060 |
+
|
| 1061 |
+
|
| 1062 |
+
Call for Contributions
|
| 1063 |
+
----------------------
|
| 1064 |
+
|
| 1065 |
+
We appreciate and welcome contributions. Small improvements or fixes are always appreciated; issues labeled as "good
|
| 1066 |
+
first issue" may be a good starting point. Have a look at `our contributing
|
| 1067 |
+
guide <https://scipy.github.io/devdocs/dev/index.html>`__.
|
| 1068 |
+
|
| 1069 |
+
Writing code isn’t the only way to contribute to SciPy. You can also:
|
| 1070 |
+
|
| 1071 |
+
- review pull requests
|
| 1072 |
+
- triage issues
|
| 1073 |
+
- develop tutorials, presentations, and other educational materials
|
| 1074 |
+
- maintain and improve `our website <https://github.com/scipy/scipy.org>`__
|
| 1075 |
+
- develop graphic design for our brand assets and promotional materials
|
| 1076 |
+
- help with outreach and onboard new contributors
|
| 1077 |
+
- write grant proposals and help with other fundraising efforts
|
| 1078 |
+
|
| 1079 |
+
If you’re unsure where to start or how your skills fit in, reach out! You can
|
| 1080 |
+
ask on the `forum <https://discuss.scientific-python.org/c/contributor/scipy>`__
|
| 1081 |
+
or here, on GitHub, by leaving a comment on a relevant issue that is already
|
| 1082 |
+
open.
|
| 1083 |
+
|
| 1084 |
+
If you are new to contributing to open source, `this
|
| 1085 |
+
guide <https://opensource.guide/how-to-contribute/>`__ helps explain why, what,
|
| 1086 |
+
and how to get involved.
|
.cache/pip/http-v2/5/3/c/6/f/53c6f1b77a8f1e352a63c5345029a5605eefe3a3b447be5197ecbdf6
ADDED
|
Binary file (1.13 kB). View file
|
|
|
.cache/pip/http-v2/5/7/9/6/9/579696a4d0ec2ed4bd10e921a9322921fc84cd85037e43849a2550e4
ADDED
|
Binary file (1.17 kB). View file
|
|
|
.cache/pip/http-v2/5/7/9/6/9/579696a4d0ec2ed4bd10e921a9322921fc84cd85037e43849a2550e4.body
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: pyarrow
|
| 3 |
+
Version: 23.0.0
|
| 4 |
+
Summary: Python library for Apache Arrow
|
| 5 |
+
Maintainer-email: Apache Arrow Developers <dev@arrow.apache.org>
|
| 6 |
+
License-Expression: Apache-2.0
|
| 7 |
+
Project-URL: Homepage, https://arrow.apache.org/
|
| 8 |
+
Project-URL: Documentation, https://arrow.apache.org/docs/python
|
| 9 |
+
Project-URL: Repository, https://github.com/apache/arrow
|
| 10 |
+
Project-URL: Issues, https://github.com/apache/arrow/issues
|
| 11 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 12 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 13 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 14 |
+
Classifier: Programming Language :: Python :: 3.13
|
| 15 |
+
Classifier: Programming Language :: Python :: 3.14
|
| 16 |
+
Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
|
| 17 |
+
Requires-Python: >=3.10
|
| 18 |
+
Description-Content-Type: text/markdown
|
| 19 |
+
|
| 20 |
+
<!---
|
| 21 |
+
Licensed to the Apache Software Foundation (ASF) under one
|
| 22 |
+
or more contributor license agreements. See the NOTICE file
|
| 23 |
+
distributed with this work for additional information
|
| 24 |
+
regarding copyright ownership. The ASF licenses this file
|
| 25 |
+
to you under the Apache License, Version 2.0 (the
|
| 26 |
+
"License"); you may not use this file except in compliance
|
| 27 |
+
with the License. You may obtain a copy of the License at
|
| 28 |
+
|
| 29 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 30 |
+
|
| 31 |
+
Unless required by applicable law or agreed to in writing,
|
| 32 |
+
software distributed under the License is distributed on an
|
| 33 |
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
| 34 |
+
KIND, either express or implied. See the License for the
|
| 35 |
+
specific language governing permissions and limitations
|
| 36 |
+
under the License.
|
| 37 |
+
-->
|
| 38 |
+
|
| 39 |
+
## Python library for Apache Arrow
|
| 40 |
+
|
| 41 |
+
[](https://pypi.org/project/pyarrow/) [](https://anaconda.org/conda-forge/pyarrow)
|
| 42 |
+
|
| 43 |
+
This library provides a Python API for functionality provided by the Arrow C++
|
| 44 |
+
libraries, along with tools for Arrow integration and interoperability with
|
| 45 |
+
pandas, NumPy, and other software in the Python ecosystem.
|
| 46 |
+
|
| 47 |
+
## Installing
|
| 48 |
+
|
| 49 |
+
Across platforms, you can install a recent version of pyarrow with the conda
|
| 50 |
+
package manager:
|
| 51 |
+
|
| 52 |
+
```shell
|
| 53 |
+
conda install pyarrow -c conda-forge
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
On Linux, macOS, and Windows, you can also install binary wheels from PyPI with
|
| 57 |
+
pip:
|
| 58 |
+
|
| 59 |
+
```shell
|
| 60 |
+
pip install pyarrow
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
If you encounter any issues importing the pip wheels on Windows, you may need
|
| 64 |
+
to install the latest [Visual C++ Redistributable for Visual Studio][3].
|
| 65 |
+
|
| 66 |
+
## Development
|
| 67 |
+
|
| 68 |
+
See [Python Development][2] in the documentation subproject.
|
| 69 |
+
|
| 70 |
+
### Building the documentation
|
| 71 |
+
|
| 72 |
+
See [documentation build instructions][1] in the documentation subproject.
|
| 73 |
+
|
| 74 |
+
[1]: https://github.com/apache/arrow/blob/main/docs/source/developers/documentation.rst
|
| 75 |
+
[2]: https://arrow.apache.org/docs/developers/python/index.html
|
| 76 |
+
[3]: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version
|
.cache/pip/http-v2/5/7/9/e/2/579e2ad9657050287391093fa10622681dc2a40279585c8bd02ee23b
ADDED
|
Binary file (1.13 kB). View file
|
|
|
.cache/pip/http-v2/5/b/e/6/4/5be64dddf357efe8e015c621695508a39823691e4777c7d90558ec8b
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/5/c/3/a/d/5c3adee19af20e371ea5467aaf0afa1ef775c17213954479df44f6af
ADDED
|
Binary file (1.78 kB). View file
|
|
|
.cache/pip/http-v2/5/c/3/a/d/5c3adee19af20e371ea5467aaf0afa1ef775c17213954479df44f6af.body
ADDED
|
Binary file (9.89 kB). View file
|
|
|
.cache/pip/http-v2/5/c/7/3/2/5c7324e1f6f306065fa6d1263cbce82c8310fb4475bb74e6f90422e3
ADDED
|
Binary file (1.78 kB). View file
|
|
|