Models for working with JSON, ie: JsonModel
Project description
Json Modeling Library
Provides easy way to map dict to/from Full-Fledged 'JsonModel' object.
Documentation
📄 Detailed Documentation | 🐍 PyPi
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.4.1.tar.gz
(80.9 kB
view details)
Built Distribution
xmodel-0.4.1-py3-none-any.whl
(92.3 kB
view details)
File details
Details for the file xmodel-0.4.1.tar.gz
.
File metadata
- Download URL: xmodel-0.4.1.tar.gz
- Upload date:
- Size: 80.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1036-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 257b4f076b738d429c2db518949fa81f2f342943a50bd839517cf78114abf7eb |
|
MD5 | 36814086347559a119294f7e4204c5f4 |
|
BLAKE2b-256 | bcd1b3d4c1e7282645dc85815f02525ad1d2f4466e0e7c05486c70b654d19290 |
File details
Details for the file xmodel-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: xmodel-0.4.1-py3-none-any.whl
- Upload date:
- Size: 92.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1036-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b34cb1b4f6103c53a2a8cd9cb9e927f58f3850cc7d6ba1e5151716dae333438 |
|
MD5 | 6efd3e30da50b16d433e57fbc0b2fe6e |
|
BLAKE2b-256 | 8d21a612c9cf9ff58e2c7e7bb3008c03f450a5aa826e24e95de24d3ba998d8bf |