csv23
Python 2/3 unicode CSV compatibility layer
Decision gist · record as of 2026-08-14
Yes, if you maintain Python 2.7 code or need to support both Python 2 and 3 in the same codebase. The package is stable, has no known vulnerabilities, and low install friction. However, if you are writing new code for Python 3 only, the standard library csv module is sufficient—install this only if cross-version compatibility is a real requirement.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with a single mock dependency.
- Repository is active with recent commits (last commit 2026-07-06), though the latest release was 2022-06-12, suggesting the package is stable rather than actively developed.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use this freely in commercial and open-source projects with minimal restrictions—just include the license notice.
last release 2022-06-12 (1524 days) · last repo commit 2026-07-06 · 6 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 327,602 downloads/mo, #7,567 on PyPI
Alternatives
Verify before relying
pip install csv23
import csv23
with csv23.open_csv('data.csv') as reader:
for row in reader:
print(row)- Whether the package is still maintained or in maintenance-only mode given the gap between last release (2022-06-12) and recent commits.
- Scope of the stdlib CSV bugs fixed (bpo-12178, bpo-31590) and whether they remain relevant in current Python versions.
What it is and what it does
csv23 bridges the Python 2/3 divide for CSV handling by exposing the Python 3 csv module API (which uses unicode strings) to both Python 2.7 and Python 3 code. The core problem it solves is that Python 2's csv module works with byte strings while Python 3's works with unicode, making it difficult to write CSV code that runs on both versions. csv23 hides this difference and defaults to UTF-8 encoding throughout.
Beyond basic compatibility, it provides convenience utilities like open_csv() context managers for simpler file handling, and on Python 3 it adds read_csv() and write_csv() functions that work with file-like objects (useful for reading/writing CSV data from binary streams). It also includes workarounds for specific stdlib CSV bugs related to escape characters and embedded newlines.
Use it for
- Writing CSV parsing/writing code that must run unchanged on both Python 2.7 and Python 3 without conditional logic.
- Reading or writing CSV data directly to binary streams without intermediate disk writes.
- Calculating checksums over CSV output by piping to hashlib objects without writing to disk.
- Transparently handling compressed CSV files (.bz2, .gz, .xz) with the autocompress option.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you maintain Python 2.7 code or need to support both Python 2 and 3 in the same codebase.
The package is stable, has no known vulnerabilities, and low install friction. However, if you are writing new code for Python 3 only, the standard library csv module is sufficient—install this only if cross-version compatibility is a real requirement.
Install
csv23 on PyPI
Before you install
Low friction: pure Python wheel with a single mock dependency. Repository is active with recent commits (last commit 2026-07-06), though the latest release was 2022-06-12, suggesting the package is stable rather than actively developed.
License in practice
MIT license (permissive) means you can use this freely in commercial and open-source projects with minimal restrictions—just include the license notice.
Quickstart
pip install csv23
import csv23
with csv23.open_csv('data.csv') as reader:
for row in reader:
print(row)
Verify before relying
- Whether the package is still maintained or in maintenance-only mode given the gap between last release (2022-06-12) and recent commits.
- Scope of the stdlib CSV bugs fixed (bpo-12178, bpo-31590) and whether they remain relevant in current Python versions.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.* |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagemock |
| Maintenance | Actively maintained 1,524 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 327,602 / month, #7,567 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: csv23-0.3.4-py2.py3-none-any.whl
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 › “python 2 3 csv compatibility”
- csv23Provides a Python 3-style unicode CSV API that works consistently…
- backports.csvProvides Python 3's csv module API for Python 2, with native Unicode…
- pycsvschemaValidates CSV files against a schema definition, checking field…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also backports.csv · clevercsv · django-queryset-csv · pyorc · unicodecsv · linear-tsv · aiocsv · csvw · latexcodec · win_unicode_console