-
Notifications
You must be signed in to change notification settings - Fork 0
Structures (e.g. JSON) validator for Python language.
License
kmerenkov/validol
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Copyright (c) 2008, 2009 by Konstantin Merenkov <kmerenkov@gmail.com> Project's homepage: http://github.com/kmerenkov/validol/tree/master See LICENSE file in the same directory as this README ==== About ==== Validol gives you ability to validate simple python structures. I wrote this code to validate JSON requests. Long story short: you want it if: - you are writing json-api for your service - you want to validate any other native data structure :) ==== Help? Documentation? ==== There are many unit tests shipped with the sourcecode. Peek there to find out how to use validol. From what I can say, usage is very easy and "declarative". Also, classes have some sort of docstrings. ==== Speed? ==== There is a file called stress_tests.py It tests large structures. Time its execution time and see if it satisfies you. From what I can say - unless your data has thousands of items you have no problems. However, I will give you few tips: 1. Lists and tuples are fastest to validate. 2. Hashes are fast 3. 'Optional' type is slower but still fast enough for you not to worry. 4. Rest is okay. If you want to validate incoming JSON objects for your RPC - you should not worry. ==== Stability? ==== The code is stable. When I find a bug I fix it as soon as possible, however it was a long time ago when I found anything wrong. There are many unit tests (more than 60).
About
Structures (e.g. JSON) validator for Python language.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published