Use marshmallow-dataclass as a Django Field
Project description
Use marshmallow-dataclasses as Django Fields.
Usage
from marshmallow_dataclass_djangofield import MarshmallowField
from marshmallow_dataclass_djangofield import marshmallow_dataclass_djangofield
class MyModel(Model):
@marshmallow_dataclass_djangofield(model_name='MyModel')
@marshmallow_dataclass.dataclass
class MyDataClass:
foo: str
bar: int
foobars = MarshmallowField(many=True, schema=MyDataClass)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for marshmallow-dataclass-djangofield-0.1.1.post1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e374e942377575cb78cef044eb7fa4fc0348e4b3daf3ee18a6b57fa78f01057 |
|
MD5 | ba6f7062399a60c8f50ae218436b24c2 |
|
BLAKE2b-256 | 91460b2daa93dabd4f4d979ff7ce04654e59b72f7509956bb5c50e9b264a0e83 |
Close
Hashes for marshmallow_dataclass_djangofield-0.1.1.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11c66907d70ce9a74c728f0942232dc2d171ff29a5da154b51f8c5ee6c4aca04 |
|
MD5 | 759339df84a09fb1a905ff222417211f |
|
BLAKE2b-256 | 8f5a5503533e5548e7bfdc7118afff4f4d37169a121ef5dde1af100d37f637ed |