Skip to main content
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)

Metadata

Release files for valida 0.7.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for valida 0.7.5
File Size Uploaded
valida-0.7.5.tar.gz 23.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for valida 0.7.5
File Interpreter ABI Platform
valida-0.7.5-py3-none-any.whl Python 3 none any Details

Total release size: 50.4 kB

Release files / valida-0.7.5.tar.gz

Download URL valida-0.7.5.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
86bb6d187552f18f7d773550bc985304ec71913cc61d659f3d454bb42a7694d3
BLAKE2b-256 checksum
How to use checksums
d4ab738588ae16c5843b1873d5ef4bebc7e25ea55b09697d88bd0f3d3c962ba3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.11.10 Linux/6.5.0-1025-azure

Release files / valida-0.7.5-py3-none-any.whl

Download URL valida-0.7.5-py3-none-any.whl
Size 26.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4dc3a3b5cfc228327d44fe59dc08cdea2728124ec2ac40d1fcd76c5ba8da6c9b
BLAKE2b-256 checksum
How to use checksums
9d40096a60e48c2ef1b1a48caa78e3afac5e2f780ebc98f81d2373f3149f1c0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.11.10 Linux/6.5.0-1025-azure

Release history Release notifications | RSS feed

This release

0.7.5 This release

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page