Skip to main content

Typed json data

Project description

Jata - Typed Json Data

Simple class to convert to and from json with benefits of IDE autocomplete. Designed primarily for using Json web APIs directly without an unnecessary wrapper client. See example.py for usage

Features

  • Allows to declare types and defaults in class definition
  • No restriction on the order of default and non-default fields even for inherited fields
  • Does no validation, all fields are optional and can be set later
  • Allows python keywords as fields with pykw_ prefix. The prefix is automatically removed/added on json conversion
  • Does not care about extra unexpected fields. They just silently exist. Beware of typhos!

TODO

  • Tool for generating constructor stubs (They don't work for IDE autocomplete)
  • Tool for generating class from a sample json
  • unit tests
  • write doc - Using StrEnum, constructor example, Comparison table
  • Continuous integration
  • Optionally do validation before serializing

Related

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

python-jata-1.2.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_jata-1.2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file python-jata-1.2.tar.gz.

File metadata

  • Download URL: python-jata-1.2.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for python-jata-1.2.tar.gz
Algorithm Hash digest
SHA256 ff4cd7ca75c9a8306b69ef6e878c296a5602f3279c6f9a82b6105b8eba764760
MD5 c1bb6b06fc15283d4046b5143a03c9fd
BLAKE2b-256 23e8ee1136479f13a4268cb18b26cf65e734add311b0d3e21c0a3b25eb56b45e

See more details on using hashes here.

File details

Details for the file python_jata-1.2-py3-none-any.whl.

File metadata

  • Download URL: python_jata-1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for python_jata-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c05e3008721ebf19b95b6c51495afa9df6017f88356e4d48853034a20011579
MD5 c522ce71192e23097d8cb5e73d914328
BLAKE2b-256 9d3500808b48ec65b860d1f097e3fc85aa27921a28ddddb1e0d3595ea9998543

See more details on using hashes here.

Supported by

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