pycsvschema 0.0.6

Last updated:

0 purchases

pycsvschema 0.0.6 Image
pycsvschema 0.0.6 Images
Add to Cart

Description:

pycsvschema 0.0.6

PyPI Page: https://pypi.python.org/pypi/pycsvschema
Github Page: https://github.com/crowdskout/PyCSVSchema

Introduction
PyCSVSchema is an implementation of CSV Schema in Python.
This project is under heavy development.
>>> from pycsvschema.checker import Validator
>>>
>>> # demo.csv:
... # id,name,value
... # 1,Ann,"5"
... # 2,Ben,"10"
... # 3,Tom,"14"
...
>>>
>>> schema = {
... 'fields': [
... {
... 'name': 'value',
... 'type': 'number',
... 'multipleOf': 5
... }
... ]
... }
>>>
>>> v = Validator(filename='demo.csv', schema=schema)
>>> v.validate()

Traceback (most recent call last):
...
<ValidationError: 'Value 14.0 is not multiple of 5'; column: value; row: 3>


Installation
pip install pycsvschema


License
PyCSVSchema uses the MIT license, see LICENSE file for the details.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.