csvsort
Sort large CSV files on disk rather than in memory
Decision gist · record as of 2026-08-14
Yes, if you have a specific need to sort a CSV file too large for memory and can tolerate the aging codebase. The package is simple, has no dependencies, and solves a narrow problem well. However, verify Python version compatibility before relying on it in production, and consider whether a database or streaming tool might be more appropriate for your workflow. The LGPL license is permissive for internal use but requires disclosure if you modify and distribute the library.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Python support is unspecified in the package metadata; the description mentions Python 2 & 3 support, but no minimum version is declared.
- High install friction reported.
- The package is aging—last release was 2020-06-17, over 2249 days ago—and the repository shows minimal activity (14 stars, last commit 2025-05-11).
License · maintenance · safety
lgpl (copyleft) — Licensed under LGPL (copyleft). You must disclose source code modifications and make the modified library available under the same license if you distribute it; static linking or vendoring may require legal review depending on your use case.
last release 2020-06-17 (2249 days) · last repo commit 2025-05-11 · 14 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 120,586 downloads/mo, #12,017 on PyPI
Alternatives
Verify before relying
from csvsort import csvsort
# Sort test.csv on columns 4 and 2 (0-indexed)
csvsort('test.csv', [4, 2])
# Sort with custom output file and delimiter
csvsort('test.tsv', [0], output_filename='sorted.tsv', delimiter='\t', max_size=10)- Whether Python 2 support is still functional or if the package is effectively Python 3-only in practice.
- Current performance characteristics and memory efficiency on modern systems with large files.
- Whether the package handles edge cases like malformed CSV, special characters, or non-ASCII encodings reliably.
What it is and what it does
csvsort is a utility for sorting CSV files that exceed available memory. It implements an external merge-sort algorithm: the original file is split into smaller chunks that fit in memory, each chunk is sorted independently, and then the sorted chunks are merged back together. The package supports custom delimiters (for TSV and other formats), column selection, header detection, and CSV quoting options.
The tool is designed for a specific, narrow use case: when you have a large CSV file on disk and need to sort it without loading the entire file into RAM. It has no runtime dependencies and is straightforward to use via a single function call. However, the package is aging—last released in 2020 with minimal recent activity—and Python version support is undocumented, creating uncertainty about compatibility with current Python releases.
Use it for
- Sort a multi-gigabyte CSV export from a database without exhausting available memory.
- Organize log files or data dumps by timestamp or ID columns before downstream processing.
- Prepare large datasets for merge operations or deduplication that require sorted input.
- Sort TSV or other delimiter-separated files using the same merge-sort strategy.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you have a specific need to sort a CSV file too large for memory and can tolerate the aging codebase.
The package is simple, has no dependencies, and solves a narrow problem well. However, verify Python version compatibility before relying on it in production, and consider whether a database or streaming tool might be more appropriate for your workflow. The LGPL license is permissive for internal use but requires disclosure if you modify and distribute the library.
Install
csvsort on PyPI
Before you install
High install friction reported. The package is aging—last release was 2020-06-17, over 2249 days ago—and the repository shows minimal activity (14 stars, last commit 2025-05-11). No runtime dependencies, but the age and inactivity suggest limited ongoing maintenance.
Python support is unspecified in the package metadata; the description mentions Python 2 & 3 support, but no minimum version is declared.
License in practice
Licensed under LGPL (copyleft). You must disclose source code modifications and make the modified library available under the same license if you distribute it; static linking or vendoring may require legal review depending on your use case.
Quickstart
from csvsort import csvsort
# Sort test.csv on columns 4 and 2 (0-indexed)
csvsort('test.csv', [4, 2])
# Sort with custom output file and delimiter
csvsort('test.tsv', [0], output_filename='sorted.tsv', delimiter='\t', max_size=10)
Verify before relying
- Whether Python 2 support is still functional or if the package is effectively Python 3-only in practice.
- Current performance characteristics and memory efficiency on modern systems with large files.
- Whether the package handles edge cases like malformed CSV, special characters, or non-ASCII encodings reliably.
Package facts
| License | lgpl copyleft |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Aging 2,249 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 120,586 / month, #12,017 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: csvsort-1.6.1.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sort large csv files”
- csvsortSorts large CSV files on disk using a merge-sort algorithm that…
- xlsx2csvConverts XLSX spreadsheet files to CSV format, handling large files…
- linear-tsvParses and writes tabular data in Linear TSV format, a line-oriented…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also natsort · pyuca · xlsx2csv · django-admin-csvexport · sort-lines · usort · csv-diff · linear-tsv · detect-delimiter · zope.sequencesort