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

Uploaded Source

Built Distribution

xmodel-0.8.0-py3-none-any.whl (93.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xmodel-0.8.0.tar.gz
  • Upload date:
  • Size: 82.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1011-azure

File hashes

Hashes for xmodel-0.8.0.tar.gz
Algorithm Hash digest
SHA256 fe85c23c98780bcc5a5a7c5be494b71f04b74162ec14d0543dc5f7a23e6d1f72
MD5 4e1c448a557c5ccc00720c0ee1c340dd
BLAKE2b-256 f7858e10333aa893c90286f7fe4d8a973b244a2d689e6c1b1b468506a215555a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmodel-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 93.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1011-azure

File hashes

Hashes for xmodel-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 681483600264fe5fd0131ee3f52261de21654c36471db1cd751473db019dc4e1
MD5 8ef1a4a587bcf45c1691907163b939f3
BLAKE2b-256 864702de9eb8713c1f0ac22de998b9a736011c8fc791844be31af3b68d614fde

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