PyCSVSchema is an implementation of CSV Schema in Python.
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycsvschema-0.0.4.tar.gz
(9.1 kB
view hashes)
Built Distribution
Close
Hashes for pycsvschema-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17637dc30a9d645545febc9b241cc851b699487a76635c9bbdb2da5e7a4cc128 |
|
MD5 | ca67ceda070198d28177be7feb5ed7ee |
|
BLAKE2b-256 | 4411e7980a2637378505b1b748f86afe049aa830cfb84749a552e94654f5a608 |