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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f58c42e0e13c2c8ae84c6c3142a8aabb5837192528c66c8c449f6d4fb665fb9 |
|
MD5 | 8a6db86d908a4fdef360dcbac6e61aa3 |
|
BLAKE2b-256 | eea7ff29e15f4d423fe185a6cf6191846c91653f27c5efdf5dc786557d3aa577 |
Close
Hashes for marshmallow_dataclass_djangofield-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60319a97fa1573fffd58f4a73cc10d517a2883736bff9fbeecf3432a896d7666 |
|
MD5 | 96e0e0847d6968dbb697eeb439625c64 |
|
BLAKE2b-256 | 7d7ea6dd0e24b4712894e2b6af607dc11298a951129ce0f1c6e6b2729185bf41 |