--- id: csvsort version: "1.6.1" license: lgpl license_treatment: copyleft maintenance: aging --- # csvsort — Sort large CSV files on disk rather than in memory License: copyleft · Maintenance: aging · Downloads: 120.6K/mo ## 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 above — verify before relying. Sorts large CSV files on disk using a merge-sort algorithm that breaks files into memory-manageable chunks, sorts them, and merges the results—useful when the entire file cannot fit in RAM. 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 pip install csvsort uv add csvsort poetry add csvsort ## Installing csvsort 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. 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) Python support is unspecified in the package metadata; the description mentions Python 2 & 3 support, but no minimum version is declared. 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: unspecified - Install friction: high - Maintenance: aging - Downloads: 120.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sort large csv files, csv sorting out of memory, merge sort csv, disk-based csv sorting, handle oversized csv data, csv file chunking, external sort csv, csv-processing, external-sort, data-tools [View on SkillFed](https://skillfed.io/packages/csvsort) · [View on PyPI](https://pypi.org/project/csvsort/)