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

Uploaded Source

Built Distribution

xmodel-1.0.1-py3-none-any.whl (93.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xmodel-1.0.1.tar.gz
  • Upload date:
  • Size: 82.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for xmodel-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0b31d0a0c20f5887a786565b9748019b8024133b4ffd0cd4fd4cd5e9df5d3976
MD5 02ed0394e83a6b195a0fed3d00015fc3
BLAKE2b-256 629ad1d7cb2f663b117afa8f47d6804fc25d339b17856f489d1d0aa4d118df63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmodel-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 93.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for xmodel-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53605525daae730784a54db272be28ed3fd8f0a366dcb2ce0a2a6e98298240be
MD5 4b42ad0b41a0020643dacd81ea5d3abb
BLAKE2b-256 7a5c1017e49a2b91eecbe2be19c4caa9f060e301425d7075f0496342c784c6a5

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