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.14.tar.gz
(21.7 kB
view details)
File details
Details for the file nr.databind.core-0.0.14.tar.gz
.
File metadata
- Download URL: nr.databind.core-0.0.14.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a32c4bc92d9ed9c2533003ba174aaa3adfd73cf3d7d5ae25554ce2ed2c09d1dd |
|
MD5 | d63d39234825cf07fd1f01a4de1a8de1 |
|
BLAKE2b-256 | 265932ff11311c750a4b40361a7ddd16b155877375809cf922085d468b32d50c |