Show HN: PySchemes – A library for validating data structures in Python
github.com
github.com
- https://github.com/alecthomas/voluptuous
- https://github.com/schematics/schematics
https://github.com/shezadkhan137/required
It makes it easier to expresses complex inter-field validation rules, and is meant to be used with other validation libraries.
https://pypi.python.org/pypi/obiwan
It predates the MyPy syntax and, in my opinion, is a gazillion times prettier and my "pythonic". I'm not bitter ;)
It's "actively maintained" but I haven't needed to do anything in ages - it just works :)
PySchemes seems to have very similar syntax, but obiwan is also able to validate signatures in function annotations and is particularly good at validating JSON and msgpack APIs (the python code to validate an API is self-describing and makes excellent API documentation for other parties).
Similar design to Voluptuous, but it also supports a destructuring bind instead of just validation.
I don't think those are in the same league
To me, that's a complete showstopper.
https://pypi.python.org/pypi/jsonschema
A post showing a simple use of it:
Using JSON Schema with Python to validate JSON data:
https://jugad2.blogspot.in/2015/12/using-json-schema-with-py...
Not all Python objects are json-serializable by default, so the ideal solution (for me) would be json-schema with simple syntax for adding custom type validators.
it offers run-time type checking in a variety of ways, is intuitive, and actively maintained
It's a bit like document databases, people are starting to realize again how convenient relational databases and how helpful schemas are.
Also error messages for the user. I've mostly used Voluptuous, but it provides much easier to understand error messages.