Ordered dataclass serializer mixin for sloted dataclasses
Project description
Serious Serializers
Simple class mixin to add YAML serialization and deserialization to dataclass objects that use slots.
Examples
To add serialization to dataclass object:
from serious_serializers import SlotsSerializer
@dataclass(slots=True)
class Data(SlotsSerializer):
n: int
data: List[float]
To represent the class tag as !Data
:
from serious_serializers import SlotsSerializer
@SlotsSerializer.show_tag
@dataclass(slots=True)
class Data(SlotsSerializer):
n: int
data: List[float]
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
File details
Details for the file serious_serializers-0.1.0.tar.gz
.
File metadata
- Download URL: serious_serializers-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bcc09dd9aea14d4978381e8bc688e801045725039f56b40797da4656622f5fc |
|
MD5 | 0a55a25973e7377b518691961a88e8f7 |
|
BLAKE2b-256 | 71f795aa15520ab5ff2503cc99fa7696343fb9986cca2fe49e698abf7583b1fd |
File details
Details for the file serious_serializers-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: serious_serializers-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ad65a467e0f9c556a6f09c690e84a2446f7d4728fbc7d6da8164301ba5ba07e |
|
MD5 | 8144517e22312eee310ad49c1cd252c5 |
|
BLAKE2b-256 | b8d093540cc3aa6f9d1a9c116edaeef7440d59eb28c0ac5f118b127c9fa63504 |