{"id":27508,"library":"validx","title":"ValidX","description":"ValidX is a fast, powerful, and flexible data validation library for Python with a clean and sane syntax. It supports complex nested validations, transformations, and custom rules. Current version is 0.8.1, released under MIT license. Release cadence is irregular.","status":"active","version":"0.8.1","language":"python","source_language":"en","source_url":"https://github.com/Cottonwood-Technology/ValidX","tags":["validation","data-validation","schema"],"install":[{"cmd":"pip install validx","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Direct import of the module does not expose validate; must import explicitly.","wrong":"import validx","symbol":"validate","correct":"from validx import validate"}],"quickstart":{"code":"from validx import validate\n\nschema = {\n    \"name\": str,\n    \"age\": int,\n    \"email\": str\n}\n\ndata = {\"name\": \"Alice\", \"age\": 30, \"email\": \"alice@example.com\"}\nresult = validate(schema, data)\nprint(result.valid)  # True if valid, False otherwise\nprint(result.errors) # Empty list if valid","lang":"python","description":"Basic usage: define a schema using Python types, then call validate()."},"warnings":[{"fix":"Update code to use .valid and .errors attributes instead of tuple unpacking.","message":"In versions < 0.8.0, `validate` returned a tuple (valid, errors). In 0.8.0+ it returns a Result object with attributes .valid and .errors.","severity":"deprecated","affected_versions":"<0.8.0"},{"fix":"Always use dict for object schemas: {'nested': {'key': int}}","message":"Nested schemas must be defined as dicts, not as tuples or lists. Using a tuple for a nested validation will be treated as a sequence validator, not a dict validator.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install validx` and ensure you are in the correct virtual environment.","cause":"Library not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'validx'"},{"fix":"Change `import validx` to `from validx import validate`.","cause":"Incorrect import: you imported 'validx' instead of 'validate'.","error":"AttributeError: module 'validx' has no attribute 'validate'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}