Skip to main content

Python typed object schema validation

Project description

objectmodel

Python typed object model for schema creation and validation

A bit unpythonic object definition, but sometimes things should be strict and typed :) Ideal for protocols and schemas.

Objects populated by ObjectModel class guarantee to match the desired state and fully serializable at any time.

Installation

This library is still in a development state, so please dont use it right away - the API might change at any time

pip install objectmodel

TODO

  • Performance benchmarks (ObjectModel vs plain object, namedtuple, dict)
  • __state__: Dict[str, Any] vs dynamically populated __slots__
  • Better validation and state ensurance
  • Strict collections (ObjectModelList and ObjectModelDict)?
    • Separate key and value validation for collections
  • Better field API
    • Predefined fields (StringField, IntField, FloatField)
  • Proxy fields:
    • MethodField or ComputedField
  • Readonly fields
  • More tests!
  • More examples
  • Auto-deployment to PyPI

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

objectmodel-0.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

objectmodel-0.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file objectmodel-0.2.tar.gz.

File metadata

  • Download URL: objectmodel-0.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for objectmodel-0.2.tar.gz
Algorithm Hash digest
SHA256 11e99245b23e6a43161b8a46b2ecda32fd253433ad0866e1aed27cf8fe18d613
MD5 c6a730b449f39112f5eb5567b5d05016
BLAKE2b-256 fdda14a51efc9ab7e57b8bbd96ce1c20579a46031d89abd788de3bad91c5798d

See more details on using hashes here.

File details

Details for the file objectmodel-0.2-py3-none-any.whl.

File metadata

  • Download URL: objectmodel-0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for objectmodel-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 68d324f35f5d390ed9dca68f6f30068daa9e68d2bda491984f6c53abc326227e
MD5 8d6095d73427c12b4bb1f182187c2b45
BLAKE2b-256 fade5ba9758f15daa7daa6933fee8032bf608b873f74d64a0b5deb69d39c3724

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