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 -i https://test.pypi.org/simple/ 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.1.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for objectmodel-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8426a549e74a2b6b8106904f2b2222935ea3fc0ea7eab5295a69e53a982d46b6 |
|
MD5 | a910bba993944beb6748f32b5ed1a2e8 |
|
BLAKE2b-256 | f512f9b34be388f862add74cbb1545105d2108d464676bbfc2834f95c701db1b |