Models for working with JSON, ie: JsonModel
Project description
Json Modeling Library
Provides easy way to map dict to/from Full-Fledged 'JsonModel' object.
Getting Started
???+ warning "Alpha Software!" This is pre-release Alpha software, based on another code base and the needed changes to make a final release version are not yet completed. Everything is subject to change!
poetry install xmodel
or
pip install xmodel
Very basic example:
from xmodel import JsonModel
class MyModel(JsonModel):
some_attr: str
json_dict_input = {'some_attr': 'a-value'}
obj = MyModel(json_dict_input)
assert obj.some_attr == 'a-value'
json_dict = obj.api.json()
assert json_dict == json_dict_input
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
xmodel-0.3.0.tar.gz
(79.5 kB
view details)
Built Distribution
xmodel-0.3.0-py3-none-any.whl
(91.3 kB
view details)
File details
Details for the file xmodel-0.3.0.tar.gz
.
File metadata
- Download URL: xmodel-0.3.0.tar.gz
- Upload date:
- Size: 79.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67d3b978f06aa1b3b6937d39e3e4f4fc68e8ae2f0bb3e504e858cc2a2116d0dc |
|
MD5 | 00cb184f770162440fd0c3405aebfcc7 |
|
BLAKE2b-256 | 2c0cf4bbee4dbe95d8d3cd819ab032719edcf60e0e82f3407bcb8abf58a0a6f2 |
File details
Details for the file xmodel-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: xmodel-0.3.0-py3-none-any.whl
- Upload date:
- Size: 91.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a969ee84cfe5f21073fd04f6ddcc72ce55995040a0160d35f32bfa24d8b3f427 |
|
MD5 | 1ae3c9b0c37f4f095bf2d35cc457881c |
|
BLAKE2b-256 | e69cc664cba056bd491a8486251882a6f36316853dbf1abe7a695ca00b0ebd83 |