muffin-rest 7.3.3__tar.gz → 7.3.5__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.
Files changed (38) hide show
  1. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/PKG-INFO +1 -1
  2. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/peewee/filters.py +1 -0
  3. muffin_rest-7.3.5/muffin_rest/peewee/schemas.py +17 -0
  4. {muffin_rest-7.3.3/muffin_rest/peewee → muffin_rest-7.3.5/muffin_rest}/schemas.py +0 -14
  5. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/pyproject.toml +1 -1
  6. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/LICENSE +0 -0
  7. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/README.rst +0 -0
  8. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/__init__.py +0 -0
  9. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/api.py +0 -0
  10. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/errors.py +0 -0
  11. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/filters.py +0 -0
  12. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/handler.py +0 -0
  13. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/marshmallow.py +0 -0
  14. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/mongo/__init__.py +0 -0
  15. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/mongo/filters.py +0 -0
  16. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/mongo/schema.py +0 -0
  17. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/mongo/sorting.py +0 -0
  18. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/mongo/types.py +0 -0
  19. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/mongo/utils.py +0 -0
  20. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/openapi.py +0 -0
  21. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/options.py +0 -0
  22. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/peewee/__init__.py +0 -0
  23. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/peewee/handler.py +0 -0
  24. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/peewee/openapi.py +0 -0
  25. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/peewee/options.py +0 -0
  26. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/peewee/sorting.py +0 -0
  27. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/peewee/types.py +0 -0
  28. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/peewee/utils.py +0 -0
  29. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/py.typed +0 -0
  30. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/redoc.html +0 -0
  31. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/sorting.py +0 -0
  32. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/sqlalchemy/__init__.py +0 -0
  33. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/sqlalchemy/filters.py +0 -0
  34. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/sqlalchemy/sorting.py +0 -0
  35. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/sqlalchemy/types.py +0 -0
  36. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/swagger.html +0 -0
  37. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/types.py +0 -0
  38. {muffin_rest-7.3.3 → muffin_rest-7.3.5}/muffin_rest/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: muffin-rest
3
- Version: 7.3.3
3
+ Version: 7.3.5
4
4
  Summary: The package provides enhanced support for writing REST APIs with Muffin framework
5
5
  Home-page: https://github.com/klen/muffin-rest
6
6
  License: MIT
@@ -25,6 +25,7 @@ class PWFilter(Filter):
25
25
  operators["$ends"] = lambda f, v: f.endswith(v)
26
26
  operators["$between"] = lambda f, v: f.between(*v)
27
27
  operators["$regexp"] = lambda f, v: f.regexp(v)
28
+ operators["$null"] = lambda f, v: f.is_null(v)
28
29
  operators["$or"] = lambda col, value: reduce(operator.or_, [op(col, val) for op, val in value])
29
30
  operators["$and"] = lambda col, value: reduce(
30
31
  operator.and_, [op(col, val) for op, val in value]
@@ -0,0 +1,17 @@
1
+ import marshmallow as ma
2
+ from marshmallow_peewee import DefaultConverter
3
+ from muffin_peewee.fields import IntEnumField, StrEnumField, URLField
4
+
5
+ from muffin_rest.schemas import EnumField
6
+
7
+
8
+ @DefaultConverter.register(StrEnumField)
9
+ @DefaultConverter.register(IntEnumField)
10
+ def build_field(field, opts, **params):
11
+ params.pop("validate", None)
12
+ return EnumField(field.enum, **params)
13
+
14
+
15
+ DefaultConverter.register(URLField, ma.fields.Url)
16
+
17
+ # ruff: noqa: ARG001, ARG002
@@ -1,6 +1,4 @@
1
1
  import marshmallow as ma
2
- from marshmallow_peewee import DefaultConverter
3
- from muffin_peewee.fields import IntEnumField, StrEnumField, URLField
4
2
 
5
3
 
6
4
  class EnumField(ma.fields.Field):
@@ -27,15 +25,3 @@ class EnumField(ma.fields.Field):
27
25
  return self.enum(value)
28
26
  except ValueError as error:
29
27
  raise self.make_error("unknown", choices=self.choices_text) from error
30
-
31
-
32
- @DefaultConverter.register(StrEnumField)
33
- @DefaultConverter.register(IntEnumField)
34
- def build_field(field, opts, **params):
35
- params.pop("validate", None)
36
- return EnumField(field.enum, **params)
37
-
38
-
39
- DefaultConverter.register(URLField, ma.fields.Url)
40
-
41
- # ruff: noqa: ARG001, ARG002
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "muffin-rest"
3
- version = "7.3.3"
3
+ version = "7.3.5"
4
4
  description = "The package provides enhanced support for writing REST APIs with Muffin framework"
5
5
  readme = "README.rst"
6
6
  homepage = "https://github.com/klen/muffin-rest"
File without changes
File without changes