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.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8192cfef2406e2b90a8e13b88b33bf377be510fd7886d3a4c75972972ab73b0b |
|
MD5 | 904787f50349eb2c07b2c3c8881ca4c6 |
|
BLAKE2b-256 | 412f1054141f2fce188a8405a90526f0b44bb308920559a2f7a3e38ab7706271 |
Close
Hashes for marshmallow_dataclass_djangofield-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5191a613cfe94b6fa4b4451b65936caec402088db3dc88215504af2ef41dec15 |
|
MD5 | 9fda585dca3bc10e7bcb62f5c769537e |
|
BLAKE2b-256 | 4fc82bd7470bb2483686e4cf97e2ec73f846b827d8c6c04abd7a713ac9563c61 |