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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xmodel-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5838cffb73b5a09f1a9fa0611b73ebaddb2de27ed2cadbcf8c8e14c066cbffea
MD5 f033ca9fed7d75a678bebe98b35ae63f
BLAKE2b-256 9eccf644d299344bcc4168e957d97a510367d1eb01daee93a9887f8713ffdb26

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for xmodel-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e03a7e73d3a85c3b3c1db1af7ad69966b06c5c25db47617d43f2d27fb1a7608
MD5 b8291d94796d26fabe3354229ad65494
BLAKE2b-256 2854ad3dd1164d553091130bdc64aa3c6eceffda8f1a83e9d2e86031c81ae46c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page