Skip to main content

Models for working with JSON, ie: JsonModel

Project description

Json Modeling Library

Provides easy way to map dict to/from Full-Fledged 'JsonModel' object.

PythonSupport PyPI version

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


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.0.tar.gz (80.9 kB view details)

Uploaded Source

Built Distribution

xmodel-0.4.0-py3-none-any.whl (92.3 kB view details)

Uploaded Python 3

File details

Details for the file xmodel-0.4.0.tar.gz.

File metadata

  • Download URL: xmodel-0.4.0.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

Hashes for xmodel-0.4.0.tar.gz
Algorithm Hash digest
SHA256 dc9ab55b3abe2626ab8500c1789ef83c1a3be7284453b6b828ccbc0f5581e1aa
MD5 acd0ee953982ac1d082355028293913e
BLAKE2b-256 97a689df7682c3722659c8865dc90956e6bda47c3f3581017cd5c84237b17d6c

See more details on using hashes here.

File details

Details for the file xmodel-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: xmodel-0.4.0-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

Hashes for xmodel-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8620f99b31abc10f7648bfd61c081582d0871224d4113583c260da4146a7eb42
MD5 d0c2f47193f6e28d4806ac6cd42c7b5f
BLAKE2b-256 75140bfa48cf16ed9d83249f6f92242fee43d46b2ba70612899351068b30da0e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page