Library for input validation designed for (but not restricted to) JSON-based APIs, neatly integrating with dataclasses.
Project description
validataclass
Python library for input validation designed for (but not restricted to) JSON-based APIs, neatly integrating with dataclasses.
Status: In development / beta.
Installation
validataclass is available on PyPI.
To install it using pip, just run:
pip install validataclass
If you add the package to your requirements.txt
, it is recommended to use compatible release
version specifiers to make sure you always get the latest version of the library but without running into breaking changes:
pip install validataclass~=0.3
Usage
See docs/
for documentation on how to use this library and
for examples.
(Note: The documentation is mostly done now, but still a work in progress.)
Development
Virtual environment
To setup a virtualenv for development of the library, run make venv
.
Alternatively you can manually run the following commands (which do the same as the make target):
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ pip install -e .
Running unit tests
Unit tests can be run using make tox
or by directly executing tox
.
For this to work you need to either be inside the virtualenv (see above) or to have tox installed in your system locally.
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
Built Distribution
Hashes for validataclass-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7513d35a26044c8570e88b0aad09f76f86e997d6e34fa423a7f9900523a07878 |
|
MD5 | 37ffc07f001738c2613c334d6949d1a2 |
|
BLAKE2b-256 | 9e1d38826c0a84e4aac5e32712e94fb38c2b6339c39f6ee668b8d9f7d7ec2ad3 |