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.18.tar.gz
(23.4 kB
view hashes)
Built Distribution
Close
Hashes for nr.databind.core-0.0.18-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 008e94c421e617cb0df568ad2e7ef018845368b896885b4d2a6f3c61ca4d9e15 |
|
MD5 | 519ba45fc939a2d813b3881319fb66a5 |
|
BLAKE2b-256 | 46c1e2c6d2a9f6d04021a20ec88fb60157fd47a1c9ec420d77bf118fc1cbffc9 |