skillfed

detect-delimiter

Detects the delimiter used in CSV, TSV and other ad hoc file formats.

detect-delimiter v0.1.1 349.1K downloads/30d#7,337 on PyPI
Permissive license Abandoned released

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-delimiter

uv

uv add detect-delimiter

poetry

poetry add detect-delimiter

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Topic :: Software Development :: LibrariesTopic :: Text ProcessingTopic :: Utilities

Tags

detect csv delimiterauto-detect file separatorfind delimiter in textcsv format detectiondelimiter inferenceparse unknown delimiterstext file format detection
csv-parsingabandoned

More Libraries packages