muffin-rest 13.0.2__py3-none-any.whl → 13.0.3__py3-none-any.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.
- muffin_rest/limits.py +4 -6
- {muffin_rest-13.0.2.dist-info → muffin_rest-13.0.3.dist-info}/METADATA +4 -2
- {muffin_rest-13.0.2.dist-info → muffin_rest-13.0.3.dist-info}/RECORD +5 -5
- {muffin_rest-13.0.2.dist-info → muffin_rest-13.0.3.dist-info}/WHEEL +1 -1
- {muffin_rest-13.0.2.dist-info → muffin_rest-13.0.3.dist-info/licenses}/LICENSE +0 -0
muffin_rest/limits.py
CHANGED
|
@@ -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
|
|
@@ -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
|
|
@@ -3,7 +3,7 @@ muffin_rest/api.py,sha256=bdbXMPiZi5yXf7_u3XB_gaGDHZKzDPqnnFnrwHoO1Rs,3799
|
|
|
3
3
|
muffin_rest/errors.py,sha256=Todg7CrCE1ufOsyyARI2Bv-RqNPH4Rl1p-Tkpq7VYrA,1151
|
|
4
4
|
muffin_rest/filters.py,sha256=nWlwDLuId-mmP3tgZjp1joYCVx0k9ekV42fPIMMKphM,5920
|
|
5
5
|
muffin_rest/handler.py,sha256=97nkx5rGB2CE_7oPG4UOLVw7b4UcGbubkSt1m_LrHhk,10762
|
|
6
|
-
muffin_rest/limits.py,sha256=
|
|
6
|
+
muffin_rest/limits.py,sha256=X6qwuQPUdKJiPRgiKLY2NquXZlrpbx7BYHH3njw9ros,2168
|
|
7
7
|
muffin_rest/marshmallow.py,sha256=-MyMKiaMTfiWw4y-4adpfoQd05HV1vEKqSXJh8eD3xg,548
|
|
8
8
|
muffin_rest/mongo/__init__.py,sha256=dck5zDEv0P3v_2CdlPI7Nbg8xay-EIzy9Y0yksEZkxw,4665
|
|
9
9
|
muffin_rest/mongo/filters.py,sha256=yIxIDVqMn6SoDgVhCqiTxYetw0hoaf_3jIvX2Vnizok,964
|
|
@@ -33,7 +33,7 @@ muffin_rest/sqlalchemy/types.py,sha256=Exm-zAQCtPAwXvYcCTtPRqSa-wTEWRcH_v2YSsJkB
|
|
|
33
33
|
muffin_rest/swagger.html,sha256=2uGLu_KpkYf925KnDKHBJmV9pm6OHn5C3BWScESsUS8,1736
|
|
34
34
|
muffin_rest/types.py,sha256=5NY9gPTIptv6U2Qab2xMXlS_jZuTuR0bquFFwWRURcA,510
|
|
35
35
|
muffin_rest/utils.py,sha256=c08E4HJ4SLYC-91GKPEbsyKTZ4sZbTN4qDqJbNg_HTE,2076
|
|
36
|
-
muffin_rest-13.0.
|
|
37
|
-
muffin_rest-13.0.
|
|
38
|
-
muffin_rest-13.0.
|
|
39
|
-
muffin_rest-13.0.
|
|
36
|
+
muffin_rest-13.0.3.dist-info/METADATA,sha256=sk-98taZjJD1AJ5dcMGLAlSnlLj5EIJZsYzHuxfv5-o,4985
|
|
37
|
+
muffin_rest-13.0.3.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
38
|
+
muffin_rest-13.0.3.dist-info/licenses/LICENSE,sha256=xHPkOZhjyKBMOwXpWn9IB_BVLjrrMxv2M9slKkHj2hM,1082
|
|
39
|
+
muffin_rest-13.0.3.dist-info/RECORD,,
|
|
File without changes
|