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)
Metadata
Release files for marshmallow-dataclass-djangofield 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| marshmallow_dataclass_djangofield-0.4.0.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| marshmallow_dataclass_djangofield-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.9 kB
Release files / marshmallow_dataclass_djangofield-0.4.0.tar.gz
| Download URL | marshmallow_dataclass_djangofield-0.4.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8192cfef2406e2b90a8e13b88b33bf377be510fd7886d3a4c75972972ab73b0b
|
|
BLAKE2b-256 checksum How to use checksums |
412f1054141f2fce188a8405a90526f0b44bb308920559a2f7a3e38ab7706271
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.11.1 Linux/5.15.0-1024-azure
|
Release files / marshmallow_dataclass_djangofield-0.4.0-py3-none-any.whl
| Download URL | marshmallow_dataclass_djangofield-0.4.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5191a613cfe94b6fa4b4451b65936caec402088db3dc88215504af2ef41dec15
|
|
BLAKE2b-256 checksum How to use checksums |
4fc82bd7470bb2483686e4cf97e2ec73f846b827d8c6c04abd7a713ac9563c61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.11.1 Linux/5.15.0-1024-azure
|