Cleans up SQL Server's bcp Export
Project description
🧹 bcp-exorcist
Fix malformed CSVs exported with broken delimiters and newlines from legacy systems.
bcp-exorcist is a Python extension written in Rust that "exorcises" broken CSV files using uncommon delimiters and newline characters. It processes files in memory-efficient batches and transforms them into proper, escaped CSV files ready for analysis or ingestion.
✨ Features
- Efficient batch processing of large CSV files.
- Handles broken CSVs with custom delimiters (e.g.
\x1E) and newlines (e.g.\x1D). - Recovers valid CSV structure with correct escaping.
- Rust-powered speed with Python simplicity.
📦 Installation
pip install bcp-exorcist
☦️ Example
from bcp_exorcist import exorcize_csv
try:
exorcize_csv("path/to/broken.csv", delim=b'\x1E', newline=b'\x1D', chunk_size=1024 * 1024)
print("Exorcism completed successfully!")
except TypeError:
print("`delim` and `newline` must be single-byte values.")
except FileNotFoundError:
print("Check that the filepath is correct.")
except RuntimeError as e:
print(f"Exorcism failed: {e}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bcp_exorcist-0.2.1-pp311-pypy311_pp73-win_amd64.whl.
File metadata
- Download URL: bcp_exorcist-0.2.1-pp311-pypy311_pp73-win_amd64.whl
- Upload date:
- Size: 214.6 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0045ba0eb6e834767e7ef06dda58ad833192084e58934f2fd8dd94eb555d8551
|
|
| MD5 |
fb2a6254980ccb84b5158a662c2723e1
|
|
| BLAKE2b-256 |
bc74e7ec5185d8ab1f8a129e6acad8afd4af122c55e45481b85ed84d93e8013b
|
File details
Details for the file bcp_exorcist-0.2.1-pp310-pypy310_pp73-win_amd64.whl.
File metadata
- Download URL: bcp_exorcist-0.2.1-pp310-pypy310_pp73-win_amd64.whl
- Upload date:
- Size: 214.8 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2edf176f3fd997aeaf5e7a8f190efe5ada44050d97833328cbe690ff33c50799
|
|
| MD5 |
37d76edb0bc1346f8e1676feda1bacde
|
|
| BLAKE2b-256 |
311d75bf242b55bd265bb66156f1ad7b91751d0d5a114826510c4806e55f050e
|
File details
Details for the file bcp_exorcist-0.2.1-pp39-pypy39_pp73-win_amd64.whl.
File metadata
- Download URL: bcp_exorcist-0.2.1-pp39-pypy39_pp73-win_amd64.whl
- Upload date:
- Size: 216.1 kB
- Tags: PyPy, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f573f52fb0ced17eff52023a3317e832400b31d219815f0e88dc1dac01f98a2
|
|
| MD5 |
80682a956eb0e1209587185b7ace25e1
|
|
| BLAKE2b-256 |
28028d3c79241316186d853d4682ec8612df2b338787f2218bbdaae2d1e94007
|
File details
Details for the file bcp_exorcist-0.2.1-cp313-cp313t-win_amd64.whl.
File metadata
- Download URL: bcp_exorcist-0.2.1-cp313-cp313t-win_amd64.whl
- Upload date:
- Size: 213.9 kB
- Tags: CPython 3.13t, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9600242d99e87aec3db21ef00e1a518e520be62fce88e76dcd61213b484ed9d9
|
|
| MD5 |
ebfbd283bd21a37773c7d378f2ed73e5
|
|
| BLAKE2b-256 |
0c39dad662ff23aa35f08a94ad929e1d32c294f28d99f41b0a0d7b8a35b01b3d
|
File details
Details for the file bcp_exorcist-0.2.1-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: bcp_exorcist-0.2.1-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 215.9 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72ec7431c3c17e9906b5c2d867ab237cb19f584ac5a28541a21484941bece5eb
|
|
| MD5 |
95f4bf4364a2450780dae35214a10386
|
|
| BLAKE2b-256 |
bc988e513ba8c6207631af863be1d47347f684293a22d860775b30de4348e9c0
|
File details
Details for the file bcp_exorcist-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: bcp_exorcist-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 231.9 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25f7769ff377c146b1cadad63844f581caac5144ae5709c0ae3e90b337a55ee8
|
|
| MD5 |
f83f80b40c5e12bf639f2fe53b9aff54
|
|
| BLAKE2b-256 |
198e7bc7d82de6dd0082f30b80fcf8b689e65c3e2dce6ae394fbc1cf5892cd98
|
File details
Details for the file bcp_exorcist-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: bcp_exorcist-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 215.9 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e46332d862f063c7ee9f415453d7a6e4dfbf82ad7b940683dd6d52821c3b8b2
|
|
| MD5 |
8bb6a675650cb3400c9fcf48934be4c7
|
|
| BLAKE2b-256 |
5b3048d9074f54d58ad5ebbb6d1d11a81072aa0c64009dbeb2ebdc211cdaab35
|