muffin-rest 4.7.0__py3-none-any.whl → 4.8.0__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/handler.py +4 -6
- muffin_rest/peewee/filters.py +3 -1
- {muffin_rest-4.7.0.dist-info → muffin_rest-4.8.0.dist-info}/METADATA +1 -1
- {muffin_rest-4.7.0.dist-info → muffin_rest-4.8.0.dist-info}/RECORD +6 -6
- {muffin_rest-4.7.0.dist-info → muffin_rest-4.8.0.dist-info}/LICENSE +0 -0
- {muffin_rest-4.7.0.dist-info → muffin_rest-4.8.0.dist-info}/WHEEL +0 -0
muffin_rest/handler.py
CHANGED
|
@@ -260,15 +260,13 @@ class RESTBase(Generic[TVResource], Handler, metaclass=RESTHandlerMeta):
|
|
|
260
260
|
)
|
|
261
261
|
|
|
262
262
|
@overload
|
|
263
|
-
async def dump(
|
|
264
|
-
self, request, data, *, many: Literal[
|
|
265
|
-
) -> TSchemaRes:
|
|
263
|
+
async def dump( # type: ignore[misc]
|
|
264
|
+
self, request, data, *, many: Literal[True], **opts
|
|
265
|
+
) -> List[TSchemaRes]:
|
|
266
266
|
...
|
|
267
267
|
|
|
268
268
|
@overload
|
|
269
|
-
async def dump(
|
|
270
|
-
self, request, data, *, many: Literal[True], **opts
|
|
271
|
-
) -> List[TSchemaRes]:
|
|
269
|
+
async def dump(self, request, data, *, many: bool = False, **opts) -> TSchemaRes:
|
|
272
270
|
...
|
|
273
271
|
|
|
274
272
|
async def dump(
|
muffin_rest/peewee/filters.py
CHANGED
|
@@ -27,6 +27,7 @@ class PWFilter(Filter):
|
|
|
27
27
|
operators["$regexp"] = lambda f, v: f.regexp(v)
|
|
28
28
|
|
|
29
29
|
list_ops = [*Filter.list_ops, "$between"]
|
|
30
|
+
field: Optional[Field] = None
|
|
30
31
|
|
|
31
32
|
def __init__(
|
|
32
33
|
self,
|
|
@@ -39,7 +40,8 @@ class PWFilter(Filter):
|
|
|
39
40
|
):
|
|
40
41
|
"""Support custom model fields."""
|
|
41
42
|
self.name = name
|
|
42
|
-
|
|
43
|
+
if field:
|
|
44
|
+
self.field = field
|
|
43
45
|
self.schema_field = schema_field or self.schema_field_cls(
|
|
44
46
|
attribute=field and field.name or name,
|
|
45
47
|
)
|
|
@@ -2,7 +2,7 @@ muffin_rest/__init__.py,sha256=NBZeOEJgQHtFFhVgd9d0fpApFRgU405sbm0cu1y1MOU,1242
|
|
|
2
2
|
muffin_rest/api.py,sha256=gCqRb5PgKEMkE84Y0ZnJw_laVRmVWZRxzBqBv0ns6w8,3882
|
|
3
3
|
muffin_rest/errors.py,sha256=TIXSADZYSwx70dOVPRAzuNwGLfpLuzZZ1ugMZMwIGDo,1169
|
|
4
4
|
muffin_rest/filters.py,sha256=KS7AxzHHtNxJ7GIMyZEebFiivkfRHYJA5Q6nWpbg12I,5051
|
|
5
|
-
muffin_rest/handler.py,sha256=
|
|
5
|
+
muffin_rest/handler.py,sha256=Tsbm9dKVoyqSy1sWKZ1Dzy1LTuMdlYDIUjrl5cZa0rQ,10377
|
|
6
6
|
muffin_rest/mongo/__init__.py,sha256=eFr4nWkBMLkD33sd9M2srtEzuTH8nfQ25hQB1_ZOqWo,4842
|
|
7
7
|
muffin_rest/mongo/filters.py,sha256=y2FleM_BqkICKGq3PmM_StOgKlE7RoSxt2NdQfCvnOE,921
|
|
8
8
|
muffin_rest/mongo/schema.py,sha256=y4OEPQnlV_COTIIQ3cKmpqDpD2r18eAWn0rijQldWm0,1205
|
|
@@ -12,7 +12,7 @@ muffin_rest/mongo/utils.py,sha256=RZdAiKaTsgaFz8WbIPI_sjjVDsF_VmPu5Agzp5mpbvY,39
|
|
|
12
12
|
muffin_rest/openapi.py,sha256=LEOR86dmo0Y3fC7vaI4_AGchInIZXAWCQkpBYERAjg0,8808
|
|
13
13
|
muffin_rest/options.py,sha256=PcrGY1qq3exgOdeJp8tYYC2V83c5vVMQrARgUkxrNTM,1927
|
|
14
14
|
muffin_rest/peewee/__init__.py,sha256=kO0vPZpr1UVY8QifCvRFUtAqoh_BChVKN630S7V6Zxw,5372
|
|
15
|
-
muffin_rest/peewee/filters.py,sha256=
|
|
15
|
+
muffin_rest/peewee/filters.py,sha256=j-ii3dLJIf5FO-PruAkUldPEih9HYfvwWHENPDSGwWA,3058
|
|
16
16
|
muffin_rest/peewee/openapi.py,sha256=ZZuh7nJVuK9cTJqtOJ_XASe9iJgter-xIjj9YJ8xszI,1111
|
|
17
17
|
muffin_rest/peewee/options.py,sha256=02E8yOXHaHl0smKV8qI6er7YS3IcuroDPl7GR_YuLjo,1489
|
|
18
18
|
muffin_rest/peewee/schemas.py,sha256=GYex652UOBoFBvpkqDupBe8kXJHIEBF2diZPjE-BXj4,1076
|
|
@@ -28,7 +28,7 @@ muffin_rest/sqlalchemy/types.py,sha256=JnIw44XJ2ClWzOv-mTUrvFw1JPxAlvdX_jf7r4zau
|
|
|
28
28
|
muffin_rest/swagger.html,sha256=FGTD5pU9ZUNmlaaVZ1TSajNHvoZ9IiNhJ5yw6Yk_Kz4,4058
|
|
29
29
|
muffin_rest/types.py,sha256=s-Ez9hZXBx8Ea0jc1elPvMxV32h2wGvHBGIN5NmWz1Y,455
|
|
30
30
|
muffin_rest/utils.py,sha256=XDljXx3bzyYH2W74qvdUNbYF61GOpmuweZ06P_mRG6g,2070
|
|
31
|
-
muffin_rest-4.
|
|
32
|
-
muffin_rest-4.
|
|
33
|
-
muffin_rest-4.
|
|
34
|
-
muffin_rest-4.
|
|
31
|
+
muffin_rest-4.8.0.dist-info/LICENSE,sha256=xHPkOZhjyKBMOwXpWn9IB_BVLjrrMxv2M9slKkHj2hM,1082
|
|
32
|
+
muffin_rest-4.8.0.dist-info/METADATA,sha256=0bDSiY9fU63TSOme_gMrX6SH3-dwmKmBels7kDV0A5w,4376
|
|
33
|
+
muffin_rest-4.8.0.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
|
34
|
+
muffin_rest-4.8.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|