update to python fastpi

This commit is contained in:
Iliyan Angelov
2025-11-16 15:59:05 +02:00
parent 93d4c1df80
commit 98ccd5b6ff
4464 changed files with 773233 additions and 13740 deletions

View File

@@ -0,0 +1,216 @@
Metadata-Version: 2.4
Name: wrapt
Version: 2.0.1
Summary: Module for decorators, wrappers and monkey patching.
Home-page: https://github.com/GrahamDumpleton/wrapt
Author: Graham Dumpleton
Author-email: Graham Dumpleton <Graham.Dumpleton@gmail.com>
License: Copyright (c) 2013-2025, Graham Dumpleton
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Project-URL: Homepage, https://github.com/GrahamDumpleton/wrapt
Project-URL: Bug Tracker, https://github.com/GrahamDumpleton/wrapt/issues/
Project-URL: Changelog, https://wrapt.readthedocs.io/en/latest/changes.html
Project-URL: Documentation, https://wrapt.readthedocs.io/
Keywords: wrapper,proxy,decorator
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: setuptools; extra == "dev"
Dynamic: license-file
wrapt
=====
|PyPI| |Documentation|
A Python module for decorators, wrappers and monkey patching.
Overview
--------
The **wrapt** module provides a transparent object proxy for Python, which can be used as the basis for the construction of function wrappers and decorator functions.
The **wrapt** module focuses very much on correctness. It goes way beyond existing mechanisms such as ``functools.wraps()`` to ensure that decorators preserve introspectability, signatures, type checking abilities etc. The decorators that can be constructed using this module will work in far more scenarios than typical decorators and provide more predictable and consistent behaviour.
To ensure that the overhead is as minimal as possible, a C extension module is used for performance critical components. An automatic fallback to a pure Python implementation is also provided where a target system does not have a compiler to allow the C extension to be compiled.
Key Features
------------
* **Universal decorators** that work with functions, methods, classmethods, staticmethods, and classes
* **Transparent object proxies** for advanced wrapping scenarios
* **Monkey patching utilities** for safe runtime modifications
* **C extension** for optimal performance with Python fallback
* **Comprehensive introspection preservation** (signatures, annotations, etc.)
* **Thread-safe decorator implementations**
Installation
------------
Install from PyPI using pip::
pip install wrapt
Supported Python Versions
--------------------------
* Python 3.8+
* CPython and PyPy implementations
Documentation
-------------
For comprehensive documentation, examples, and advanced usage patterns, visit:
* https://wrapt.readthedocs.io/
Quick Start
-----------
To implement your decorator you need to first define a wrapper function.
This will be called each time a decorated function is called. The wrapper
function needs to take four positional arguments:
* ``wrapped`` - The wrapped function which in turns needs to be called by your wrapper function.
* ``instance`` - The object to which the wrapped function was bound when it was called.
* ``args`` - The list of positional arguments supplied when the decorated function was called.
* ``kwargs`` - The dictionary of keyword arguments supplied when the decorated function was called.
The wrapper function would do whatever it needs to, but would usually in
turn call the wrapped function that is passed in via the ``wrapped``
argument.
The decorator ``@wrapt.decorator`` then needs to be applied to the wrapper
function to convert it into a decorator which can in turn be applied to
other functions.
.. code-block:: python
import wrapt
@wrapt.decorator
def pass_through(wrapped, instance, args, kwargs):
return wrapped(*args, **kwargs)
@pass_through
def function():
pass
If you wish to implement a decorator which accepts arguments, then wrap the
definition of the decorator in a function closure. Any arguments supplied
to the outer function when the decorator is applied, will be available to
the inner wrapper when the wrapped function is called.
.. code-block:: python
import wrapt
def with_arguments(myarg1, myarg2):
@wrapt.decorator
def wrapper(wrapped, instance, args, kwargs):
return wrapped(*args, **kwargs)
return wrapper
@with_arguments(1, 2)
def function():
pass
When applied to a normal function or static method, the wrapper function
when called will be passed ``None`` as the ``instance`` argument.
When applied to an instance method, the wrapper function when called will
be passed the instance of the class the method is being called on as the
``instance`` argument. This will be the case even when the instance method
was called explicitly via the class and the instance passed as the first
argument. That is, the instance will never be passed as part of ``args``.
When applied to a class method, the wrapper function when called will be
passed the class type as the ``instance`` argument.
When applied to a class, the wrapper function when called will be passed
``None`` as the ``instance`` argument. The ``wrapped`` argument in this
case will be the class.
The above rules can be summarised with the following example.
.. code-block:: python
import inspect
@wrapt.decorator
def universal(wrapped, instance, args, kwargs):
if instance is None:
if inspect.isclass(wrapped):
# Decorator was applied to a class.
return wrapped(*args, **kwargs)
else:
# Decorator was applied to a function or staticmethod.
return wrapped(*args, **kwargs)
else:
if inspect.isclass(instance):
# Decorator was applied to a classmethod.
return wrapped(*args, **kwargs)
else:
# Decorator was applied to an instancemethod.
return wrapped(*args, **kwargs)
Using these checks it is therefore possible to create a universal decorator
that can be applied in all situations. It is no longer necessary to create
different variants of decorators for normal functions and instance methods,
or use additional wrappers to convert a function decorator into one that
will work for instance methods.
In all cases, the wrapped function passed to the wrapper function is called
in the same way, with ``args`` and ``kwargs`` being passed. The
``instance`` argument doesn't need to be used in calling the wrapped
function.
Links
-----
* **Documentation**: https://wrapt.readthedocs.io/
* **Source Code**: https://github.com/GrahamDumpleton/wrapt
* **Bug Reports**: https://github.com/GrahamDumpleton/wrapt/issues/
* **Changelog**: https://wrapt.readthedocs.io/en/latest/changes.html
.. |PyPI| image:: https://img.shields.io/pypi/v/wrapt.svg?logo=python&cacheSeconds=3600
:target: https://pypi.python.org/pypi/wrapt
.. |Documentation| image:: https://img.shields.io/badge/docs-wrapt.readthedocs.io-blue.svg
:target: https://wrapt.readthedocs.io/

View File

@@ -0,0 +1,28 @@
wrapt-2.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
wrapt-2.0.1.dist-info/METADATA,sha256=nbszIjJc0vsh_DVij7b9ct6R9G2VCzVTTPSke5imlvs,8979
wrapt-2.0.1.dist-info/RECORD,,
wrapt-2.0.1.dist-info/WHEEL,sha256=mX4U4odf6w47aVjwZUmTYd1MF9BbrhVLKlaWSvZwHEk,186
wrapt-2.0.1.dist-info/licenses/LICENSE,sha256=mrxBqmuGkMB-3ptEt8YjPQFCkO0eO1zMN-KSKVtdBY8,1304
wrapt-2.0.1.dist-info/top_level.txt,sha256=Jf7kcuXtwjUJMwOL0QzALDg2WiSiXiH9ThKMjN64DW0,6
wrapt/__init__.py,sha256=bAF7Gzqnf_vUBpf5KNFfIm5P9Drm7M0WYlt22W25Q4Y,1540
wrapt/__init__.pyi,sha256=d3CBY392zYAgBJoUeaRzdOUDbwlHgCxiLROnd4LdSG8,9402
wrapt/__pycache__/__init__.cpython-312.pyc,,
wrapt/__pycache__/__wrapt__.cpython-312.pyc,,
wrapt/__pycache__/arguments.cpython-312.pyc,,
wrapt/__pycache__/decorators.cpython-312.pyc,,
wrapt/__pycache__/importer.cpython-312.pyc,,
wrapt/__pycache__/patches.cpython-312.pyc,,
wrapt/__pycache__/proxies.cpython-312.pyc,,
wrapt/__pycache__/weakrefs.cpython-312.pyc,,
wrapt/__pycache__/wrappers.cpython-312.pyc,,
wrapt/__wrapt__.py,sha256=E_Yo7fIk51_OjMzlqXKtIhvplbYbJIPcTGD20b0GWM8,1431
wrapt/_wrappers.c,sha256=ux1b_-Me_8QpJ_QRWvCq9jt_1CZ-9TFA-cVSLqi4_Zg,115800
wrapt/_wrappers.cpython-312-x86_64-linux-gnu.so,sha256=Zw1QCySi0VTIcEPmtqIj-gCHm-oEyr5WLnvGgWyT240,273616
wrapt/arguments.py,sha256=q4bxH7GoCXhTCgxy-AEyvSnOq0ovMSHjN7ru3HWxlhA,2548
wrapt/decorators.py,sha256=ePWsg43Q5uHYSBGvbybwIZpsYdIhLGX9twbGZ7ygous,21091
wrapt/importer.py,sha256=E16XxhomZuX5jM_JEH4ZO-MYpNou1t5RZLJHWLCtsgM,12135
wrapt/patches.py,sha256=WJAKwOEeozpqgLAq_BlEu2HWbjMg9yaR65szi8J4GRQ,9907
wrapt/proxies.py,sha256=0-N74mBM3tsC_zEQ83to3Y5OMqdxEu4BhXs3Hq1GDCU,12517
wrapt/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
wrapt/weakrefs.py,sha256=5HehYcKOKsRIghxLwnCZ4EJ67rhc0z1GH__pRILRLDc,4630
wrapt/wrappers.py,sha256=btpuNklFXdpnWlQVrgib1cY08M5tm1vTSd_XEjfEgxs,34439

View File

@@ -0,0 +1,7 @@
Wheel-Version: 1.0
Generator: setuptools (80.9.0)
Root-Is-Purelib: false
Tag: cp312-cp312-manylinux_2_5_x86_64
Tag: cp312-cp312-manylinux1_x86_64
Tag: cp312-cp312-manylinux_2_28_x86_64

View File

@@ -0,0 +1,24 @@
Copyright (c) 2013-2025, Graham Dumpleton
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.