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.

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

Uploaded Source

Built Distribution

xmodel-0.2.0-py3-none-any.whl (91.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xmodel-0.2.0.tar.gz
  • Upload date:
  • Size: 79.4 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

Hashes for xmodel-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f2c7874c400e1947ecff1418005a737f68f20d3fd607bd5dec741221bed69b6b
MD5 bda51309a777c710920338ac4f47912f
BLAKE2b-256 e11ea0f86423c9e0751a299762a850040e03a15867ba21c5fa2f039aa471a655

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmodel-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 91.0 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

Hashes for xmodel-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c6a7e8d13ea1df764ba088ec8539492ab969adacd6c76cddaa43316980862bb
MD5 30639dbdf3b58483cc279989b931d0f2
BLAKE2b-256 245f6f2f93a82f589ef39334c4c08b38b4964fe9f1dc80076e4e6c3ba497dec7

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