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

Uploaded Source

Built Distribution

xmodel-0.6.0-py3-none-any.whl (92.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xmodel-0.6.0.tar.gz
  • Upload date:
  • Size: 81.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.10.6 Linux/5.15.0-1037-azure

File hashes

Hashes for xmodel-0.6.0.tar.gz
Algorithm Hash digest
SHA256 dec470f7e43c63faf0be5bebba4602e5d986b0f2cce4fb5dd4d2bfc38ad05f7e
MD5 b8cfe0103285e03ecf8420ecae21765c
BLAKE2b-256 c7d122f5b545654bcf24d077c3cb6ac6c0c0dff77fd0d341caa86921e5ea75a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmodel-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 92.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.10.6 Linux/5.15.0-1037-azure

File hashes

Hashes for xmodel-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f22c9294bd5fee84538960786d012602c637f7f637c06935ed318f7740ba777
MD5 5a4aecaa9ce78148b1c3c159a7a9d6dd
BLAKE2b-256 f8ce511e2fd2e772d97361dbdb7d75558277a87e656bf593d763b5469cd1e5ba

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