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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8136c804dede6e389eddfdb29544bc483ee8d68491daf09b54c775bfdf9ea162 |
|
MD5 | 71e6fc92a41102d97fef70d8c88559f8 |
|
BLAKE2b-256 | f1b55dbdd9149a0e8cdfad86dac6ac7134a47441dd42a7164c442e3ab2957ca7 |
Close
Hashes for marshmallow_dataclass_djangofield-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 879e56ab9557f95193141a3139ca9c83f1389c24657c25686ab6de6d4d702277 |
|
MD5 | 3b91c89d1a3423715a0159fe1e23dad7 |
|
BLAKE2b-256 | 626dcb94cf092d16c0c20746108c0a01a340b97dfe7e1943a58b0b755ce3cbcf |