Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/austinhartzheim/rigidity
Data validation and correction wrapper for Python's `csv` module.
https://github.com/austinhartzheim/rigidity
csv python python3
Last synced: about 2 months ago
JSON representation
Data validation and correction wrapper for Python's `csv` module.
- Host: GitHub
- URL: https://github.com/austinhartzheim/rigidity
- Owner: austinhartzheim
- License: gpl-3.0
- Created: 2015-07-08T03:42:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-06-15T06:30:13.000Z (over 4 years ago)
- Last Synced: 2023-08-15T04:41:14.260Z (over 1 year ago)
- Topics: csv, python, python3
- Language: Python
- Homepage: https://rigidity.readthedocs.io/
- Size: 75.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Rigidity
========.. image:: https://travis-ci.org/austinhartzheim/rigidity.svg?branch=master
:target: https://travis-ci.org/austinhartzheim/rigidity
.. image:: https://coveralls.io/repos/austinhartzheim/rigidity/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/austinhartzheim/rigidity?branch=master
.. image:: https://readthedocs.org/projects/rigidity/badge/
:target: https://rigidity.readthedocs.io/Rigidity is a simple wrapper to Python's built-in `csv` module that allows for validation and correction of data being read or written with the `csv` module.
This module allows you to easily construct validation and correction rulesets to be applied automatically while preserving the `csv` interface. In other words, you can easily upgrade old code to better adhere to new output styles, or allow new code to better parse old files.
Examples
--------
Here is asimple example of validating UPC codes and ensuring their uniqueness::import rigidity
rules = [
[rigidity.rules.UpcA(strict=True),
rigidity.rules.Unique()]
]
r = rigidity.Rigidity(reader, rules)
for row in r:
print(row[0])An explanation of this code and more documentation is available on `Read The Docs`_.
.. _Read The Docs: https://rigidity.readthedocs.io/en/latest/
Installing
----------
We are on `PyPI`_, so you can install us with `pip`::sudo pip3 install rigidity
.. _PyPI: https://pypi.python.org/pypi/rigidity/
Running Tests
-------------
You can easily run our unit tests at any time with Python's nosetests. If you also want to see test coverage, run this command.nosetests --with-coverage --cover-package=rigidity