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.12.0.tar.gz (211.4 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.12.0-py3-none-any.whl (115.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for validataclass-0.12.0.tar.gz
Algorithm Hash digest
SHA256 b876a47d33f000c582bb66ca9dbc94de47f2b91bd52f0b4737e98a9b0b8b8fa7
MD5 454a341ff9eecdb4242c72c17c64d444
BLAKE2b-256 0206ed842e48fb57d2dc8d58ed2a6e42b2028c8da7e341582cf48d66ca6802e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: validataclass-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 115.2 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.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d6ca7e0869fe7766fe3d6f9b1d5269d20ad925d2e3969108f6972df63c155a1
MD5 b3b16b4d194d61f9974f60c4545141cf
BLAKE2b-256 25fc8ed2dc848aeab967ee453d497db47b2109d3924bc09c185cb143ad20b18c

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