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
andObjectModelDict
)?- Separate key and value validation for collections
- Better field API
- Predefined fields (
StringField
,IntField
,FloatField
)
- Predefined fields (
- Proxy fields:
MethodField
orComputedField
- Readonly fields
- More tests!
- More examples
- Auto-deployment to PyPI
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for objectmodel-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68d324f35f5d390ed9dca68f6f30068daa9e68d2bda491984f6c53abc326227e |
|
MD5 | 8d6095d73427c12b4bb1f182187c2b45 |
|
BLAKE2b-256 | fade5ba9758f15daa7daa6933fee8032bf608b873f74d64a0b5deb69d39c3724 |