Skip to main content

Serialize/deserialize Python objects from/to dataclasses

Project description

serdataclasses

Warning: vaporware, subject to change at any time, for any reason, in any way.

This library has two goals:

  1. Deserialize JSON into python dataclasses
  2. Serialize Python data classes into JSON

It has no external dependencies. Python 3.8+.

Notes

  • Recursive types aren't currently supported by mypy. I have them anyway because recursive types will allegedly be supported soon. That said, the type checker isn't super happy with me at the moment.
  • Edge cases haven't been considered. This library is a learning project, for now.
  • Inspired by undictify, but special-cased to dataclasses and more-focused on serde instead of general function signature overrides.

Written by

  • Samuel Roeca

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

serdataclasses-0.1.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

serdataclasses-0.1.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

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