Skip to main content

Bind structured data directly to typed objects.

Project description

Note: This package is in the dangerous land of 0.x.y versions and may be subject to breaking changes with minor version increments.

This package is superseded by databind.core.

nr.databind.core

The nr.databind.core package provides a framework for binding structured data to typed objects as well as the (de-) serialization of that data from/to other formats.

See also: nr.databind.json.

Example

from nr.databind.core import Field, Struct

class Person(Struct):
    name = Field(str, prominent=True)
    age = Field(int)
    address = Field(int, default=None)

print(Person('John Wick', 48, 'Wicked St.'))  # Person(name='John Wick')

Copyright © 2020 Niklas Rosenstein

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

nr.databind.core-0.0.22.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

nr.databind.core-0.0.22-py2.py3-none-any.whl (31.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file nr.databind.core-0.0.22.tar.gz.

File metadata

  • Download URL: nr.databind.core-0.0.22.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for nr.databind.core-0.0.22.tar.gz
Algorithm Hash digest
SHA256 87fe32d7d8dd91b878a25cd144d056435107ca56a8db7be3030f765334075f77
MD5 09ea3998b4a59005bccb218e3fbe9705
BLAKE2b-256 1a70eebc987bc818a0cec21a43e74106803311e719bcf51a1947d30c2fa6355d

See more details on using hashes here.

File details

Details for the file nr.databind.core-0.0.22-py2.py3-none-any.whl.

File metadata

  • Download URL: nr.databind.core-0.0.22-py2.py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for nr.databind.core-0.0.22-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 854a0a0551a0aa5a5acedaa547af930bdaca331bc705b3f26732f6b913491572
MD5 cbf2653c122c5deb87420d00615069c7
BLAKE2b-256 98213470a83a9a801879f3bfdcc9071a10cc0281b23fd3439a8eb4bbbb2ba33a

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