Skip to main content

Ordered dataclass serializer mixin for sloted dataclasses

Project description

Serious Serializers

tests

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


Download files

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

Source Distribution

serious_serializers-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

serious_serializers-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

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

Hashes for serious_serializers-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2bcc09dd9aea14d4978381e8bc688e801045725039f56b40797da4656622f5fc
MD5 0a55a25973e7377b518691961a88e8f7
BLAKE2b-256 71f795aa15520ab5ff2503cc99fa7696343fb9986cca2fe49e698abf7583b1fd

See more details on using hashes here.

File details

Details for the file serious_serializers-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for serious_serializers-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ad65a467e0f9c556a6f09c690e84a2446f7d4728fbc7d6da8164301ba5ba07e
MD5 8144517e22312eee310ad49c1cd252c5
BLAKE2b-256 b8d093540cc3aa6f9d1a9c116edaeef7440d59eb28c0ac5f118b127c9fa63504

See more details on using hashes here.

Supported by

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