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.3.tar.gz
(21.0 kB
view details)
File details
Details for the file nr.databind.core-0.0.3.tar.gz
.
File metadata
- Download URL: nr.databind.core-0.0.3.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/46.0.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edd1d66bed26b56be831f1212490075e8487a86b57a4713d80734cab638620a6 |
|
MD5 | b6ec6b2c90f7aab92b4149698aba1426 |
|
BLAKE2b-256 | e876a46eb0843b7ebe153c077898561d860e2de410aad75e3cc6b14250df669e |