Metadata-Version: 2.1
Name: ez_validate
Version: 0.0.1
Summary: Builder-like data validation package
Author-email: OLODiman11 <olodiman11@mail.ru>
Classifier: Programming Language :: Python :: 2
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=2.7
Description-Content-Type: text/markdown
License-File: LICENSE

# Ez Validate

Simple package for data validation.

# Examples:

## Valid
```
var = 10.0
AssureThat(var).is_float().less_than(12.4).greater_than(9.2)
```

## Invalid
```
var = 5.0
AssureThat(var).is_float().less_than(12.4).greater_than(9.2)
```
This example will raise *ValidationError* with the following message:
> "Untitled var" must be greater than 9.2 but is 5.0

You can change the the name of variable by providing it in *AssureThat* constractor:
```
AssureThat(var, name='Your name').is_float().less_than(12.4).greater_than(9.2)
```
> Your name must be greater than 9.2 but is 5.0

To handle the error use try except clause:
```
try:
	...
except ValidationError as e:
	...
```
