Skip to main content

Python typed object schema validation

Project description


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.


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


  • 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 hashes)

Uploaded source

Built Distribution

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

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page