CSV GP: Diagnose all your CSV issues
CSVs are a ubiquitous format for data transfer that are commonly riddled with issues. Most CSV libraries abort with an unhelpful error, CSV GP allows you to pinpoint these common issues with a CSV file, as well as export just the parsable lines from a file.
Installation
CSV GP can be used in three ways.
Standalone binary
- Install rust
- Clone the repo and navigate into it
- Run
cargo install --path csv_gp - The
csv-gpcommand will now be available to run, please seecsv-gp --helpfor usage
Rust library
Add the following to your Cargo.toml:
csv-gp = { git = "https://github.com/xelixdev/csv-gp", rev = "<optional git tag>" }
Python library
From package manager
The library is available on PyPI, at https://pypi.org/project/csv-gp/ so you can just run:
pip install csv-gp
Compiling from source
- Install rust
- Install (
pip install maturin) - Clone the repo
- Run
make all cd csv_gp_python && maturin develop
Usage
Rust standalone binary
After installing the binary, the default usage is running csv-gp $FILE. This will print a diagnosis of the file. The command provides options to change the delimiter and the encoding of the file. See csv-gp -h for details.
Another option provided is --correct-rows-path which will export only the correct rows to the provided path.
Python library
The python library exposes two main functions, check_file and get_rows.
The check file function takes a path to file, the delimiter and the encoding (see https://github.com/xelixdev/csv-gp/blob/0f77c62841509c134a3bbe06ec178426e9c5aa10/csv_gp_python/csv_gp.pyi) and returns an instance of a class CSVDetails which provides details about the file. See the same file to see all the available attributes and their names/types.
If the valid_rows_output_path argument is provided to the function, only the correct rows will be exported to that path.
The get_rows once again takes a path to file, the delimiter and the encoding and additionally a list of row numbers. The function will then return the parsed cells for given rows. See the above file for the exact typing of the parameter and returned values.
Releasing a new version of the Python lib
- Update version numbers in
csv_gp_python/Cargo.toml,csv_go/Cargo.toml, andcsv_gp_python/pyproject.toml - Run
cargo checkto update the lock files with new versions - Merge this change into main
- Create a new release on GitHub, creating a tag in the form
vX.Y.Z - The 'Publish' pipeline should begin running, and the new version will be published
Running tests
Running Rust tests
Run cargo test.
Running Python tests
Follow the instructions on compiling from source. Then you can run pytest.
Metadata
Release files for csv-gp 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| csv_gp-0.4.0.tar.gz | 24.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| csv_gp-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
Total release size: 503.9 kB
Release files / csv_gp-0.4.0.tar.gz
| Download URL | csv_gp-0.4.0.tar.gz |
|---|---|
| Size | 24.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98ba7bc4e8b5faa42d984c79d9dc0d3487f82158ad35ad8cc38a22c5b68b60e0
|
|
BLAKE2b-256 checksum How to use checksums |
9ab247d4dec3cef1b1acd928c5f2c6bc2872996e98bd75cf9f9d8b700a827415
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.
Transparency logRelease files / csv_gp-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | csv_gp-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 479.4 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
68e7c2b9bc2ab59753c6b8da383f36a1e7ca6704ac4c397b60577795df5819b4
|
|
BLAKE2b-256 checksum How to use checksums |
2e7841c0e1a7f8c8b06fca2f94e45b2b04d6d8c6c82bd5807e2e093f5d3633b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.
Transparency logSecurity for csv-gp 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for csv_gp-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.