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: Beta.
Installation
validataclass is available on PyPI.
To install it using pip, just run:
pip install validataclass
If you add the package to your dependencies, 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.11.0
However, keep in mind that the library still is in its beta phase (as indicated by the major version of 0). There can and will be smaller breaking changes between 0.x minor versions, but we will try to keep them at a minimum and save the big breaking changes for the release of version 1.0.0.
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
File details
Details for the file validataclass-0.11.0.tar.gz
.
File metadata
- Download URL: validataclass-0.11.0.tar.gz
- Upload date:
- Size: 166.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fed0a0a8d623bbaabd2761cbcfb1163ae0de3ccb9a48a8161127af81d7bfac67 |
|
MD5 | 8cc30f7e55482605544d6d229f4e551c |
|
BLAKE2b-256 | fe47fb1c8fe2d162a08eb6228189db5b3c8b503f464b008cb0013217d69c6a45 |
File details
Details for the file validataclass-0.11.0-py3-none-any.whl
.
File metadata
- Download URL: validataclass-0.11.0-py3-none-any.whl
- Upload date:
- Size: 89.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c84a14eee39ce93fb0d02141cb1aad6b45aabb74f5e2a4e6d20bd61a6da98b4 |
|
MD5 | 0a1447a1c735477af4e189970d18ad81 |
|
BLAKE2b-256 | 0f2c9d8cf3a19d8410271241cece3a98f44be89b72211640fc7944e64e05537e |