{"id":19891803,"url":"https://github.com/inbo/pywhip","last_synced_at":"2025-05-02T18:31:27.233Z","repository":{"id":57458527,"uuid":"51155235","full_name":"inbo/pywhip","owner":"inbo","description":"Python package to validate data against whip specifications","archived":false,"fork":false,"pushed_at":"2023-01-30T08:17:36.000Z","size":1502,"stargazers_count":10,"open_issues_count":16,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-18T13:08:05.638Z","etag":null,"topics":["data-validation","lifewatch","oscibio","python"],"latest_commit_sha":null,"homepage":"https://inbo.github.io/pywhip/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inbo.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-05T15:36:31.000Z","updated_at":"2023-05-07T09:15:23.000Z","dependencies_parsed_at":"2023-02-16T05:31:08.429Z","dependency_job_id":null,"html_url":"https://github.com/inbo/pywhip","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbo%2Fpywhip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbo%2Fpywhip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbo%2Fpywhip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbo%2Fpywhip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inbo","download_url":"https://codeload.github.com/inbo/pywhip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252088453,"owners_count":21692796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-validation","lifewatch","oscibio","python"],"created_at":"2024-11-12T18:19:38.841Z","updated_at":"2025-05-02T18:31:25.275Z","avatar_url":"https://github.com/inbo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pywhip\n\n[![Build Status](https://img.shields.io/pypi/v/pywhip.svg)](https://pypi.python.org/pypi/pywhip)\n[![Build Status](https://travis-ci.com/inbo/pywhip.svg?branch=master)](https://travis-ci.com/inbo/pywhip)\n[![Updates](https://pyup.io/repos/github/inbo/pywhip/shield.svg)](https://pyup.io/repos/github/inbo/pywhip/)\n\nThe pywhip package is a Python package to validate data against [whip specifications](https://github.com/inbo/whip), a human and machine-readable syntax to express specifications for data.\n\n* Free software: MIT license\n* Documentation: https://inbo.github.io/pywhip\n\nCheck the [documentation pages](https://inbo.github.io/pywhip/installation.html) for more information.\n\n## Installation\n\nTo install pywhip, run this command in your terminal:\n\n```shell\npip install pywhip\n```\n\nFor more detailed installation instructions, see the [documentation pages](https://inbo.github.io/pywhip/installation.html).\n\n## Test pywhip in jupyter notebook\n\nLaunch a jupyter notebook to interactively try out the pywhip package:\n\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/inbo/pywhip/master?filepath=notebooks%2Fwhip_csv_data.ipynb)\n\n## Quickstart\n\nTo validate a CSV data file with the field headers `country`, `eventDate` and `individualCount`, write whip specifications, according to the [whip syntax](https://github.com/inbo/whip):\n\n```yaml\nspecifications = \"\"\"\n    country:\n       allowed: [BE, NL]\n    eventDate:\n        dateformat: '%Y-%m-%d'\n        mindate: 2016-01-01\n        maxdate: 2018-12-31\n    individualCount:\n        numberformat: x  # needs to be an integer value\n        min: 1\n        max: 100\n    \"\"\"\n```\n\nTo whip your data set, e.g. ``my_data.csv``, pass the data to whip specifications:\n\n\n```python\nfrom pywhip import whip_csv\n\nexample = whip_csv(\"my_data.csv\", specifications, delimiter=',')\n```\n\nand write the output report to an html file:\n\n```python\nwith open(\"report_example.html\", \"w\") as index_page:\n    index_page.write(example.get_report('html'))\n```\n\nResulting in a [report](https://inbo.github.io/pywhip/report_observations.html) like this. For a more detailed introduction, see [the documentaton tutorial](https://inbo.github.io/pywhip/tutorial.html).\n\n## Credits\n\nThis package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template.\n\nValidation of data rows is using the [Cerberus](http://docs.python-cerberus.org/en/stable/) package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finbo%2Fpywhip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finbo%2Fpywhip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finbo%2Fpywhip/lists"}