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.8.0.tar.gz
(82.5 kB
view hashes)
Built Distribution
xmodel-0.8.0-py3-none-any.whl
(93.8 kB
view hashes)