muffin-rest 13.0.2__tar.gz → 13.0.3__tar.gz
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.
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/PKG-INFO +4 -2
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/limits.py +4 -6
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/pyproject.toml +1 -1
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/LICENSE +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/README.md +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/__init__.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/api.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/errors.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/filters.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/handler.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/marshmallow.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/mongo/__init__.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/mongo/filters.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/mongo/schema.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/mongo/sorting.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/mongo/types.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/mongo/utils.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/openapi.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/options.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/peewee/__init__.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/peewee/filters.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/peewee/handler.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/peewee/openapi.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/peewee/options.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/peewee/schemas.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/peewee/sorting.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/peewee/types.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/peewee/utils.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/py.typed +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/redoc.html +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/schemas.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/sorting.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/sqlalchemy/__init__.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/sqlalchemy/filters.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/sqlalchemy/sorting.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/sqlalchemy/types.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/swagger.html +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/types.py +0 -0
- {muffin_rest-13.0.2 → muffin_rest-13.0.3}/muffin_rest/utils.py +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: muffin-rest
|
|
3
|
-
Version: 13.0.
|
|
3
|
+
Version: 13.0.3
|
|
4
4
|
Summary: The package provides enhanced support for writing REST APIs with Muffin framework
|
|
5
5
|
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Keywords: rest,api,muffin,asgi,asyncio,trio
|
|
7
8
|
Author: Kirill Klenov
|
|
8
9
|
Author-email: horneds@gmail.com
|
|
@@ -18,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
18
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
23
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
22
24
|
Provides-Extra: peewee
|
|
23
25
|
Provides-Extra: sqlalchemy
|
|
@@ -73,10 +73,8 @@ class RedisRateLimiter(RateLimiter):
|
|
|
73
73
|
|
|
74
74
|
async def _check(self, key: str) -> bool:
|
|
75
75
|
"""Check the request."""
|
|
76
|
-
|
|
77
|
-
if
|
|
78
|
-
await self.redis.
|
|
79
|
-
return True
|
|
76
|
+
current = await self.redis.incr(key)
|
|
77
|
+
if current == 1:
|
|
78
|
+
await self.redis.expire(key, self.period)
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
return int(value) < self.limit
|
|
80
|
+
return current <= self.limit
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|