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
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
nr.databind.core-0.0.22.tar.gz
(24.2 kB
view hashes)
Built Distribution
Close
Hashes for nr.databind.core-0.0.22-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 854a0a0551a0aa5a5acedaa547af930bdaca331bc705b3f26732f6b913491572 |
|
MD5 | cbf2653c122c5deb87420d00615069c7 |
|
BLAKE2b-256 | 98213470a83a9a801879f3bfdcc9071a10cc0281b23fd3439a8eb4bbbb2ba33a |