Skip to main content

Library for input validation designed for (but not restricted to) JSON-based APIs, neatly integrating with dataclasses.

Project description

validataclass

Unit tests

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

validataclass-0.13.0.tar.gz (214.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

validataclass-0.13.0-py3-none-any.whl (116.7 kB view details)

Uploaded Python 3

File details

Details for the file validataclass-0.13.0.tar.gz.

File metadata

  • Download URL: validataclass-0.13.0.tar.gz
  • Upload date:
  • Size: 214.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for validataclass-0.13.0.tar.gz
Algorithm Hash digest
SHA256 ebbdbf7c65e47aa744f7b456d2feb0292e36e8085639506b3670a5d3e485c143
MD5 638689232078b383c3a5c5c8bd0e6214
BLAKE2b-256 fb5dfbfad3adfa6fcbf9d12bdff7ff18a41817bbb2f217eb310f43e9908af2af

See more details on using hashes here.

File details

Details for the file validataclass-0.13.0-py3-none-any.whl.

File metadata

  • Download URL: validataclass-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 116.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for validataclass-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d98543c7161023dd85d05af38e69ef45c72e4a6b85475fb6804bc09922370382
MD5 535c05c8fc2cf119dbf6d56743dc6acc
BLAKE2b-256 fc37ea4a8bc88c381d0bbac4e55b5d4efec2fc66a51f233e5974014f1263e2f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page