Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marshmallow_dataclass_djangofield-0.4.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file marshmallow_dataclass_djangofield-0.4.0.tar.gz.

File metadata

File hashes

Hashes for marshmallow_dataclass_djangofield-0.4.0.tar.gz
Algorithm Hash digest
SHA256 8192cfef2406e2b90a8e13b88b33bf377be510fd7886d3a4c75972972ab73b0b
MD5 904787f50349eb2c07b2c3c8881ca4c6
BLAKE2b-256 412f1054141f2fce188a8405a90526f0b44bb308920559a2f7a3e38ab7706271

See more details on using hashes here.

File details

Details for the file marshmallow_dataclass_djangofield-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for marshmallow_dataclass_djangofield-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5191a613cfe94b6fa4b4451b65936caec402088db3dc88215504af2ef41dec15
MD5 9fda585dca3bc10e7bcb62f5c769537e
BLAKE2b-256 4fc82bd7470bb2483686e4cf97e2ec73f846b827d8c6c04abd7a713ac9563c61

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page