Skip to main content

pywhip

Build Status Build Status Updates

The pywhip package is a Python package to validate data against whip specifications, a human and machine-readable syntax to express specifications for data.

Check the documentation pages for more information.

Installation

To install pywhip, run this command in your terminal:

pip install pywhip

For more detailed installation instructions, see the documentation pages.

Test pywhip in jupyter notebook

Launch a jupyter notebook to interactively try out the pywhip package:

Binder

Quickstart

To validate a CSV data file with the field headers country, eventDate and individualCount, write whip specifications, according to the whip syntax:

specifications = """
    country:
       allowed: [BE, NL]
    eventDate:
        dateformat: '%Y-%m-%d'
        mindate: 2016-01-01
        maxdate: 2018-12-31
    individualCount:
        numberformat: x  # needs to be an integer value
        min: 1
        max: 100
    """

To whip your data set, e.g. my_data.csv, pass the data to whip specifications:

from pywhip import whip_csv

example = whip_csv("my_data.csv", specifications, delimiter=',')

and write the output report to an html file:

with open("report_example.html", "w") as index_page:
    index_page.write(example.get_report('html'))

Resulting in a report like this. For a more detailed introduction, see the documentaton tutorial.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Validation of data rows is using the Cerberus package.

Metadata

Release files for pywhip 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pywhip 0.3.4
File Size Uploaded
pywhip-0.3.4.tar.gz 56.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pywhip 0.3.4
File Interpreter ABI Platform
pywhip-0.3.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 75.0 kB

Release files / pywhip-0.3.4.tar.gz

Download URL pywhip-0.3.4.tar.gz
Size 56.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ee30d5182e34bbeb54dc6db06a784a770c41eff2f945b5ab09653821eba5f471
BLAKE2b-256 checksum
How to use checksums
f6c94021d1c7f09d4ec9442a0f324a64f39552106ed4537a6a0c0224f73e3483
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release files / pywhip-0.3.4-py2.py3-none-any.whl

Download URL pywhip-0.3.4-py2.py3-none-any.whl
Size 18.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e88be204092ecb95ab24d65bfa7bd8163ff1f310a1403898460c2e943ed5faa7
BLAKE2b-256 checksum
How to use checksums
15dda88f9f164f85ac787715a86425d5d4f46ef6ec8fdf39bf1ee648959b326c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.3.4 This release

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page