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 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