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

Uploaded Source

Built Distribution

xmodel-0.3.1-py3-none-any.whl (91.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xmodel-0.3.1.tar.gz
  • Upload date:
  • Size: 80.0 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.3.1.tar.gz
Algorithm Hash digest
SHA256 7a08ae92c50941530b63e6e35e1a2126bcc5a11109474ab717101a17dff7785c
MD5 b9642c7cf9c6b9d07da399ddd7f4f70d
BLAKE2b-256 dbcf01a428e5d4c37835680402596e2ab34a564c70316cd74369dcac984ec752

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmodel-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 91.5 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97637222ed9a2b406eba8cbb25c853598ef102cea345135e6de6e2cf377172ce
MD5 22d994514693942b836057c59c09afbe
BLAKE2b-256 ceca1d0fd6108166b18b9dbf392d4afe88881318ad4d0d79821871755d4014d2

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