Skip to main content

Library for easy converting between plain JSON-like data and compound structure of user defined class instances.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Library for easy bi-direction converting between plain JSON-like data (numbers, strings, lists and dicts) and compound user-defined classes.

Trivial example:

>>> from steward import *
>>> class Comp(Component):
...     a = Field()
...     b = Field(default=1)
...
>>> v = Comp(a=0)
>>> dct = v.as_plain()
>>> dct
{'a': 0, 'b': 1}
>>> v2 = Comp.from_plain(dct)
>>> v2.a
0
>>> v2.b
1
>>> v2.a = 7
>>> v2.as_plain()
{'a': 7, 'b': 1}

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

steward-0.0.4.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file steward-0.0.4.tar.gz.

File metadata

  • Download URL: steward-0.0.4.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for steward-0.0.4.tar.gz
Algorithm Hash digest
SHA256 3e1e61cd297f68fec40104532e2b78b9a4d76a540dffe9938ae763b369da3429
MD5 9352c8c66be470e9e5fe51ab9a4f49a6
BLAKE2b-256 0471b2150f5a47efa7217bfb5e1804863ba39e3530befcc8dcd9203f43890805

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