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.

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

Uploaded Source

Built Distribution

xmodel-0.1.1-py3-none-any.whl (91.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xmodel-0.1.1.tar.gz
  • Upload date:
  • Size: 79.4 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.1.1.tar.gz
Algorithm Hash digest
SHA256 f5db154ba3e4afb0e5116c38c621ece1bc1ddb0946d818766c348c50fa198bad
MD5 31f48a9394da9ec290023b4e3dff3324
BLAKE2b-256 08b58f5a64128154d375c81979474d834fae61ebea6f1be2b751841cc0b32ce3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xmodel-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 91.0 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3f1e7dbbdaccd05cc35502233e96df8feae3556b6146f7eec38567a97043ccb
MD5 252ef1cb84057c844193f8e00b1e82fb
BLAKE2b-256 95337de0983c85d4284ae014c15c30008da3de6c8a86121323f51e79ae13201b

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