detect-delimiter
Detects the delimiter used in CSV, TSV and other ad hoc file formats.
What it is and what it does
detect_delimiter is a lightweight utility that infers the delimiter character from a sample of delimited text. It exposes a single `detect()` function that takes a string, scans it against a configurable list of candidate delimiters (defaulting to comma, semicolon, colon, pipe, and tab), and returns the most likely separator or None if no clear match is found. You can provide a fallback default, exclude certain characters via a blacklist, or restrict the search to specific delimiters via a whitelist.
The package has no external dependencies and is designed for simple, ad hoc delimiter detection in CSV-like formats. However, it has been abandoned since its initial release in July 2018, so it receives no maintenance, bug fixes, or updates. It is suitable only for straightforward delimiter-guessing tasks where you accept the risk of using unmaintained code.
Use it for:
- Automatically detect the delimiter when importing a CSV file with unknown format before parsing
- Infer separator in user-uploaded delimited files to configure a parser without manual inspection
- Guess the delimiter in log files or other ad hoc text formats with consistent column separation
- Pre-process data pipelines that handle multiple file formats with different delimiters
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Detects the delimiter character used in CSV, TSV, and other delimited text files by analyzing sample content and returning the most likely separator.
Yes, if you need lightweight delimiter detection and accept the unmaintained status. The package has no dependencies, is small, and solves a narrow problem well. However, do not rely on it for production systems where bugs or edge cases could cause silent failures—consider it a utility for one-off scripts or low-stakes data ingestion. For critical applications, evaluate maintained alternatives or implement custom detection logic.
Install
detect-delimiter on PyPI
pip
pip install detect-delimiteruv
uv add detect-delimiterpoetry
poetry add detect-delimiterInstalling detect-delimiter
Before you install
Package is abandoned—last release was 2018-07-29 with no updates since. No runtime dependencies, so installation friction is low, but expect no maintenance or bug fixes.
License in practice
Licensed under Apache Software License (permissive), so you may use, modify, and distribute freely with attribution.
Quickstart
pip install detect-delimiter
from detect_delimiter import detect
result = detect("a|b|c\nd|e|f\n")
print(result) # '|'
# With default fallback
result = detect("no delimiters here", default=',')
print(result) # ','
Verify before relying
- Accuracy of delimiter detection across real-world malformed or ambiguous CSV files
- Whether the default whitelist (comma, semicolon, colon, pipe, tab) covers typical use cases
- Performance on very large files or files with many candidate delimiters
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,938 days since the last release |
| First released | |
| Downloads | 349,109/month — #7,337 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: detect_delimiter-0.1.1-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
linear-tsvParses and writes tabular data in Linear TSV…
permissive · top 15,000 on PyPI
csv-diffCompares two CSV, TSV, or JSON files and…
permissive · top 15,000 on PyPI
clevercsvCleverCSV detects CSV file dialects…
permissive · top 15,000 on PyPI
gibberish-detectorDetects whether strings are gibberish or valid…
permissive · top 15,000 on PyPI
pytest-csvA pytest plugin that exports test results to…
copyleft · top 15,000 on PyPI
shellinghamShellingham detects which shell the current…
permissive · top 1,000 on PyPI
csvsortSorts large CSV files on disk using a…
copyleft · top 15,000 on PyPI
tsv2pyParses and generates tab-separated values (TSV)…
permissive · top 15,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
cchardetcchardet detects the character encoding of byte…
copyleft · top 5,000 on PyPI