asgi-tools 1.0.10__cp310-cp310-macosx_11_0_arm64.whl → 1.2.0__cp310-cp310-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- asgi_tools/__init__.py +3 -2
- asgi_tools/_compat.py +13 -16
- asgi_tools/app.py +105 -51
- asgi_tools/forms.c +7506 -8030
- asgi_tools/forms.cpython-310-darwin.so +0 -0
- asgi_tools/forms.py +10 -10
- asgi_tools/middleware.py +38 -29
- asgi_tools/multipart.c +7085 -6816
- asgi_tools/multipart.cpython-310-darwin.so +0 -0
- asgi_tools/multipart.py +6 -9
- asgi_tools/request.py +65 -49
- asgi_tools/response.py +45 -50
- asgi_tools/tests.py +20 -21
- asgi_tools/view.py +2 -2
- {asgi_tools-1.0.10.dist-info → asgi_tools-1.2.0.dist-info}/METADATA +36 -34
- asgi_tools-1.2.0.dist-info/RECORD +29 -0
- {asgi_tools-1.0.10.dist-info → asgi_tools-1.2.0.dist-info}/WHEEL +2 -1
- asgi_tools-1.0.10.dist-info/RECORD +0 -29
- {asgi_tools-1.0.10.dist-info → asgi_tools-1.2.0.dist-info/licenses}/LICENSE +0 -0
- {asgi_tools-1.0.10.dist-info → asgi_tools-1.2.0.dist-info}/top_level.txt +0 -0
asgi_tools/view.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import inspect
|
4
|
-
from typing import TYPE_CHECKING, Final
|
4
|
+
from typing import TYPE_CHECKING, Final
|
5
5
|
|
6
6
|
if TYPE_CHECKING:
|
7
7
|
from collections.abc import Awaitable
|
@@ -57,7 +57,7 @@ class HTTPView:
|
|
57
57
|
return self(request, **opts)
|
58
58
|
|
59
59
|
@classmethod
|
60
|
-
def __route__(cls, router: Router, *paths: str, methods:
|
60
|
+
def __route__(cls, router: Router, *paths: str, methods: TMethods | None = None, **params):
|
61
61
|
"""Bind the class view to the given router."""
|
62
62
|
view_methods = dict(inspect.getmembers(cls, inspect.isfunction))
|
63
63
|
methods = methods or [m for m in HTTP_METHODS if m.lower() in view_methods]
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: asgi-tools
|
3
|
-
Version: 1.0
|
3
|
+
Version: 1.2.0
|
4
4
|
Summary: ASGI Toolkit to build web applications
|
5
5
|
Author-email: Kirill Klenov <horneds@gmail.com>
|
6
6
|
License: MIT License
|
@@ -13,49 +13,51 @@ Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: License :: OSI Approved :: MIT License
|
14
14
|
Classifier: Programming Language :: Python
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
16
|
-
Classifier: Programming Language :: Python :: 3.9
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
20
20
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
21
21
|
Classifier: Programming Language :: Cython
|
22
22
|
Classifier: Topic :: Internet :: WWW/HTTP
|
23
23
|
Classifier: Framework :: AsyncIO
|
24
24
|
Classifier: Framework :: Trio
|
25
|
-
Requires-Python: >=3.
|
25
|
+
Requires-Python: >=3.10
|
26
26
|
Description-Content-Type: text/x-rst
|
27
27
|
License-File: LICENSE
|
28
|
-
Requires-Dist: http-router
|
29
|
-
Requires-Dist: multidict
|
28
|
+
Requires-Dist: http-router>=4.0.0
|
29
|
+
Requires-Dist: multidict>=6.6.3
|
30
30
|
Requires-Dist: sniffio
|
31
|
-
Requires-Dist: yarl
|
32
|
-
Requires-Dist: async-timeout
|
33
|
-
Provides-Extra: dev
|
34
|
-
Requires-Dist: bump2version ; extra == 'dev'
|
35
|
-
Requires-Dist: tox ; extra == 'dev'
|
36
|
-
Requires-Dist: cython ; extra == 'dev'
|
37
|
-
Requires-Dist: pre-commit ; extra == 'dev'
|
38
|
-
Requires-Dist: sphinx ; extra == 'dev'
|
39
|
-
Requires-Dist: pydata-sphinx-theme ; extra == 'dev'
|
40
|
-
Provides-Extra: examples
|
41
|
-
Requires-Dist: uvicorn[standard] ; extra == 'examples'
|
42
|
-
Requires-Dist: jinja2 ; extra == 'examples'
|
43
|
-
Requires-Dist: httpx ; extra == 'examples'
|
44
|
-
Provides-Extra: orjson
|
45
|
-
Requires-Dist: orjson ; extra == 'orjson'
|
31
|
+
Requires-Dist: yarl>=1.8.2
|
32
|
+
Requires-Dist: async-timeout; python_version < "3.11"
|
46
33
|
Provides-Extra: tests
|
47
|
-
Requires-Dist: aiofile
|
48
|
-
Requires-Dist: pytest
|
49
|
-
Requires-Dist: pytest-aio[curio,trio]
|
50
|
-
Requires-Dist: pytest-benchmark
|
51
|
-
Requires-Dist: PyYAML
|
52
|
-
Requires-Dist: ruff
|
53
|
-
Requires-Dist:
|
54
|
-
Requires-Dist:
|
55
|
-
Requires-Dist:
|
56
|
-
Requires-Dist:
|
34
|
+
Requires-Dist: aiofile; extra == "tests"
|
35
|
+
Requires-Dist: pytest; extra == "tests"
|
36
|
+
Requires-Dist: pytest-aio[curio,trio]>=1.2.0; extra == "tests"
|
37
|
+
Requires-Dist: pytest-benchmark; extra == "tests"
|
38
|
+
Requires-Dist: PyYAML; extra == "tests"
|
39
|
+
Requires-Dist: ruff; extra == "tests"
|
40
|
+
Requires-Dist: mypy; extra == "tests"
|
41
|
+
Requires-Dist: exceptiongroup; python_version < "3.11" and extra == "tests"
|
42
|
+
Requires-Dist: ujson; implementation_name == "cpython" and extra == "tests"
|
43
|
+
Requires-Dist: uvloop; implementation_name == "cpython" and extra == "tests"
|
44
|
+
Requires-Dist: pytest-mypy; implementation_name == "cpython" and extra == "tests"
|
57
45
|
Provides-Extra: ujson
|
58
|
-
Requires-Dist: ujson
|
46
|
+
Requires-Dist: ujson; extra == "ujson"
|
47
|
+
Provides-Extra: orjson
|
48
|
+
Requires-Dist: orjson; extra == "orjson"
|
49
|
+
Provides-Extra: examples
|
50
|
+
Requires-Dist: uvicorn[standard]; extra == "examples"
|
51
|
+
Requires-Dist: jinja2; extra == "examples"
|
52
|
+
Requires-Dist: httpx; extra == "examples"
|
53
|
+
Provides-Extra: dev
|
54
|
+
Requires-Dist: bump2version; extra == "dev"
|
55
|
+
Requires-Dist: tox; extra == "dev"
|
56
|
+
Requires-Dist: cython; extra == "dev"
|
57
|
+
Requires-Dist: pre-commit; extra == "dev"
|
58
|
+
Requires-Dist: sphinx; extra == "dev"
|
59
|
+
Requires-Dist: pydata-sphinx-theme; extra == "dev"
|
60
|
+
Dynamic: license-file
|
59
61
|
|
60
62
|
.. image:: https://raw.githubusercontent.com/klen/asgi-tools/develop/.github/assets/asgi-tools.png
|
61
63
|
:height: 100
|
@@ -143,7 +145,7 @@ A Quick Example
|
|
143
145
|
|
144
146
|
You can use any of ASGI-Tools components independently.
|
145
147
|
|
146
|
-
|
148
|
+
Despite this ASGI-Tools contains App_ helper to quickly build ASGI
|
147
149
|
applications. For instance:
|
148
150
|
|
149
151
|
Save this to ``app.py``.
|
@@ -199,7 +201,7 @@ Licensed under a `MIT license`_.
|
|
199
201
|
.. _klen: https://github.com/klen
|
200
202
|
.. _uvicorn: http://www.uvicorn.org/
|
201
203
|
.. _daphne: https://github.com/django/daphne/
|
202
|
-
.. _hypercorn: https://
|
204
|
+
.. _hypercorn: https://github.com/pgjones/hypercorn/
|
203
205
|
|
204
206
|
.. _Request: https://klen.github.io/asgi-tools/api.html#request
|
205
207
|
.. _Response: https://klen.github.io/asgi-tools/api.html#responses
|
@@ -0,0 +1,29 @@
|
|
1
|
+
asgi_tools-1.2.0.dist-info/RECORD,,
|
2
|
+
asgi_tools-1.2.0.dist-info/WHEEL,sha256=11kMdE9gzbsaQG30fRcsAYxBLEVRsqJo098Y5iL60Xo,136
|
3
|
+
asgi_tools-1.2.0.dist-info/top_level.txt,sha256=-6i6ebKuJ0cSaXJ3KWPmJLKUbmBE2UsuA2b7BcZMJSk,11
|
4
|
+
asgi_tools-1.2.0.dist-info/METADATA,sha256=Oyxz72uoD1qM5iK1fxjGVEYtWZ61H-Ma0GO16M_kPKA,7138
|
5
|
+
asgi_tools-1.2.0.dist-info/licenses/LICENSE,sha256=ytogAgYcPT6gWj8aRc-cZwhSq9Y3wOzG-4KteKCyQOw,1070
|
6
|
+
asgi_tools/multipart.py,sha256=8RkJm9JIjyjR7z2OIhYg8fgLKq21HBWCMEOwbhx-3GA,21707
|
7
|
+
asgi_tools/multipart.pyx,sha256=pq-DzmAaRhS0yMJIFPNI-GP7OjJUt4k3Y8vMbXJOpKk,21929
|
8
|
+
asgi_tools/forms.c,sha256=v7t7ia5JTU68Eg1weG353v2IKfjQf_jTKUBSDmg8pgQ,826881
|
9
|
+
asgi_tools/multipart.c,sha256=EY4Z9r8PmtB-EuV7mI1evcyEGOFpKZCT-KeE5GPH2II,844007
|
10
|
+
asgi_tools/constants.py,sha256=B7fJabLdpSE4COX0vAudyC32xV0dSpLgg0kob-FlCkE,128
|
11
|
+
asgi_tools/request.py,sha256=s-CqT9JI-aPZz46YtKyvSDR7CfLxEhPrIuH9OG6npzk,10802
|
12
|
+
asgi_tools/__init__.py,sha256=tBnlggb3FJPK8tDrnpC580OfbQ0QpuKFRdyfxmIeu8w,1428
|
13
|
+
asgi_tools/response.py,sha256=ZBe1UCu64k8hRqrgGvhGrk-mT653mWnaDa7a01LFkD0,18685
|
14
|
+
asgi_tools/multipart.cpython-310-darwin.so,sha256=t02UIh8QrB8JL6YBuLvRhH1GVKUq92NTlvaYwTs0r_0,162336
|
15
|
+
asgi_tools/types.py,sha256=QWmrnhqc_jEUaXUcMm5iMpxpd6vrTcCnlq4O9moKANg,926
|
16
|
+
asgi_tools/forms.py,sha256=ers1A52YEAO1TBYWJP73K6q6jArNU7QbV0LjTlpKdeM,5059
|
17
|
+
asgi_tools/view.py,sha256=DO0Lr8euP98kMicDwmZLcbMpJ-Hzbhl3vYFYqAXpisw,1925
|
18
|
+
asgi_tools/utils.py,sha256=6qNwZbUsKatg75Gi1ltRsAeJhBaf1gwJkuR0LemitRw,2813
|
19
|
+
asgi_tools/logs.py,sha256=FaXJF5UYClU-JdqLL7VANxQ8O-eYAEemt0Zc_GaEC60,148
|
20
|
+
asgi_tools/app.py,sha256=OEkoRszSRJ9bwWQ3SKWm3Pv-R0B8uKcP9ciYsDMyCGg,10790
|
21
|
+
asgi_tools/forms.cpython-310-darwin.so,sha256=WTlKpYllq1ZBb3cy9b24XI4k7IyAavM9bzRa0Z_rH_o,187416
|
22
|
+
asgi_tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
|
+
asgi_tools/errors.py,sha256=TTAtJL5w2EVm9dVNK2pqNBRWM1lGJXg7HnJTibjgkes,550
|
24
|
+
asgi_tools/multipart.pxd,sha256=bPnRLYuBw51OX7v-SZTOgOpb4PxM1MtR5dGWVoymX3A,725
|
25
|
+
asgi_tools/forms.pyx,sha256=ol1iEXDwS--9vNIoxFFvcTRvzUF14gQC3SDWW9K5-k8,5340
|
26
|
+
asgi_tools/router.py,sha256=1MCF5QLfYPWZH10AuXMRN0rTMTyQWciDSh3owgsFhk4,440
|
27
|
+
asgi_tools/_compat.py,sha256=3BTsysYhxa0itJzCWnzpnE-HuYGs7vXzZRgQRei0IW4,7483
|
28
|
+
asgi_tools/tests.py,sha256=elUGlBE8qklBzKAov1x1i0eVHfkFLzj5Oifd6_JjHv4,12944
|
29
|
+
asgi_tools/middleware.py,sha256=_hTALpm3Gv_3ssCyZfInzuFC8onNz2ZFVrDCdgOcnF8,15148
|
@@ -1,29 +0,0 @@
|
|
1
|
-
asgi_tools/multipart.py,sha256=LNQzATAogrLEmr6Iu6ofRPbjoFZbIdyC1WeLyxxcMHA,21730
|
2
|
-
asgi_tools/multipart.pyx,sha256=pq-DzmAaRhS0yMJIFPNI-GP7OjJUt4k3Y8vMbXJOpKk,21929
|
3
|
-
asgi_tools/forms.c,sha256=d2RqYXIkAumvh7TRD4iXi8WYiJ2kyJqIhs0j5fbJdIs,817607
|
4
|
-
asgi_tools/multipart.c,sha256=U-eDBDLeOpWTS7Nt1fEdt0hvHPSi2qh5g_O0oE90wBo,814952
|
5
|
-
asgi_tools/constants.py,sha256=B7fJabLdpSE4COX0vAudyC32xV0dSpLgg0kob-FlCkE,128
|
6
|
-
asgi_tools/request.py,sha256=pm_J6rqsm_7pHuJ4Wt4-30xgP9b_v3ozZINSEJeBMtA,10407
|
7
|
-
asgi_tools/__init__.py,sha256=ULbf6SyqMpqP_eKw8YvY45QjujIdDpSuYtaX8Gi12tU,1413
|
8
|
-
asgi_tools/response.py,sha256=UnZFWhiWGr5cxDGgu2l65xAez3NITjSOCyir_9gyFoo,18865
|
9
|
-
asgi_tools/multipart.cpython-310-darwin.so,sha256=lo3MjOxlwDlqRt2axbd7OJ8-yT3vwZZfC8X5D4InXsY,160992
|
10
|
-
asgi_tools/types.py,sha256=QWmrnhqc_jEUaXUcMm5iMpxpd6vrTcCnlq4O9moKANg,926
|
11
|
-
asgi_tools/forms.py,sha256=LH_o7Ai7hNZqsPeJcI48ELBnF5avRY5ql68NRHS9Xqs,5075
|
12
|
-
asgi_tools/view.py,sha256=EgCWRjwO5IZ_VAK8s2FAK2yLLaAb9pQ4SNopIdST35U,1938
|
13
|
-
asgi_tools/utils.py,sha256=6qNwZbUsKatg75Gi1ltRsAeJhBaf1gwJkuR0LemitRw,2813
|
14
|
-
asgi_tools/logs.py,sha256=FaXJF5UYClU-JdqLL7VANxQ8O-eYAEemt0Zc_GaEC60,148
|
15
|
-
asgi_tools/app.py,sha256=zMg_R3lAnpzWfHzWkByR2msG9wKZAtECxEbtyJR_h8s,8111
|
16
|
-
asgi_tools/forms.cpython-310-darwin.so,sha256=Q_WhcfoD-Uei-bJRgQCo6sY62infGZZkmINz1GMKNxM,202568
|
17
|
-
asgi_tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
-
asgi_tools/errors.py,sha256=TTAtJL5w2EVm9dVNK2pqNBRWM1lGJXg7HnJTibjgkes,550
|
19
|
-
asgi_tools/multipart.pxd,sha256=bPnRLYuBw51OX7v-SZTOgOpb4PxM1MtR5dGWVoymX3A,725
|
20
|
-
asgi_tools/forms.pyx,sha256=ol1iEXDwS--9vNIoxFFvcTRvzUF14gQC3SDWW9K5-k8,5340
|
21
|
-
asgi_tools/router.py,sha256=1MCF5QLfYPWZH10AuXMRN0rTMTyQWciDSh3owgsFhk4,440
|
22
|
-
asgi_tools/_compat.py,sha256=cBaTKqcuUq9VL8hFl7Ydf49bI1iMwHz5Zt1-jTfhVuE,7538
|
23
|
-
asgi_tools/tests.py,sha256=xYDwDKooByo2b3DN7J1g4-rwzv9XAQ7hp_Bou-vhHM0,13043
|
24
|
-
asgi_tools/middleware.py,sha256=1gvvV7v4lO6LceqP36bZFpFvb-hEfSAvyH2_IzahKes,15003
|
25
|
-
asgi_tools-1.0.10.dist-info/RECORD,,
|
26
|
-
asgi_tools-1.0.10.dist-info/LICENSE,sha256=ytogAgYcPT6gWj8aRc-cZwhSq9Y3wOzG-4KteKCyQOw,1070
|
27
|
-
asgi_tools-1.0.10.dist-info/WHEEL,sha256=jPrF5oWulsOxop3iQfMuD22j-CtnUOYm5n_3r9ZbENY,109
|
28
|
-
asgi_tools-1.0.10.dist-info/top_level.txt,sha256=-6i6ebKuJ0cSaXJ3KWPmJLKUbmBE2UsuA2b7BcZMJSk,11
|
29
|
-
asgi_tools-1.0.10.dist-info/METADATA,sha256=K54QCiBF244kjRmGi_qqaCShWmOmNaRqp7Ph_rAR3pQ,7102
|
File without changes
|
File without changes
|