Skip to main content

Comprehensive validation library for nested data structures.

Project description

Valida logo

Validation for nested data structures

PyPI version Testing workflow Supported python versions License DOI

Installing

pip install valida

A simple example

from valida import Data, Value, Rule

# Define some data that we want to validate:
my_data = Data({'A': 1, 'B': [1, 2, 3], 'C': {'c1': 8.2, 'c2': 'hello'}})

# Define a rule as a path within the data and a condition at that path:
rule = Rule(
  path=('C', 'c2'),
  condition=Value.dtype.equal_to(str),
)

# Test the rule
rule.test(my_data).is_valid # `True` => The rule tested successfully

Acknowledgements

Valida was developed using funding from the LightForm EPSRC programme grant (EP/R001715/1)

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

valida-0.3.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

valida-0.3.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file valida-0.3.0.tar.gz.

File metadata

  • Download URL: valida-0.3.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.10 Linux/5.11.0-1028-azure

File hashes

Hashes for valida-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4d309d342740e07c85ef53062733ba1ff80bcbf68006d01cf5a6ef63a28b733d
MD5 aa16059ef1de599dcb73f22dd7fa4901
BLAKE2b-256 b77df984b1357034c95ebaa9082562e4e6b018a17741249109d6ce747887c69b

See more details on using hashes here.

File details

Details for the file valida-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: valida-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.10 Linux/5.11.0-1028-azure

File hashes

Hashes for valida-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb81344d2d1acb989ea9ef790b9916bf874bc0064477dfc973ad3a50c3302ece
MD5 66b36cc03d9d1a98cd7e114827018aa5
BLAKE2b-256 970747c2ef12d4d99a1fba94442575c7500bf498b3aff112aefa60e6fb9ebd67

See more details on using hashes here.

Supported by

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