You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

valida

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valida

Comprehensive validation library for nested data structures.


Maintainers
1

Readme

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)

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc