You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-1Lines changed: 27 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -242,7 +242,7 @@ class Sample:
242
242
243
243
See [marshmallow's documentation about extending `Schema`](https://marshmallow.readthedocs.io/en/stable/extending.html).
244
244
245
-
### Custom type declarations
245
+
### Custom type aliases
246
246
247
247
This library allows you to specify [customized marshmallow fields](https://marshmallow.readthedocs.io/en/stable/custom_fields.html#creating-a-field-class) using python's Annoted type [PEP-593](https://peps.python.org/pep-0593/).
248
248
@@ -269,6 +269,32 @@ For convenience, some custom types are provided:
269
269
from marshmallow_dataclass.typing import Email, Url
270
270
```
271
271
272
+
### Custom NewType declarations [__deprecated__]
273
+
274
+
> NewType is deprecated in favor or type aliases using Annotated, as described above.
275
+
276
+
This library exports a `NewType` function to create types that generate [customized marshmallow fields](https://marshmallow.readthedocs.io/en/stable/custom_fields.html#creating-a-field-class).
277
+
278
+
Keyword arguments to `NewType` are passed to the marshmallow field constructor.
0 commit comments