Bind structured data directly to typed objects.
Project description
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')
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.16.tar.gz
(22.0 kB
view hashes)
Built Distribution
Close
Hashes for nr.databind.core-0.0.16-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a18622614b8bf6e01a62107b14fded643166f1ee78c67ab02a8e4f6653cd1b7a |
|
MD5 | 994210d72020d58e28fb68132e173169 |
|
BLAKE2b-256 | 8c57dd99e1ea4bc9afed53ea996dec120cbcd2bac8d7e8362f46b72604337f90 |