unicodecsv
Python2's stdlib csv module is nice, but it doesn't support unicode. This module is a drop-in replacement which *does*.
What it is and what it does
unicodecsv solves a specific problem in Python 2.7: the standard csv module cannot handle Unicode strings without manual encoding workarounds. This package wraps the csv module to accept Unicode input and output transparently, accepting bytestreams (via plain `open(..., 'rb')`) and handling the encoding internally.
The package is designed for Python 2.6, 2.7, 3.3, 3.4, 3.5, and PyPy 2.4.0. It has no runtime dependencies and installs cleanly. However, it is unmaintained since 2015-09-22 and explicitly targets Python 2. Modern Python 3 handles Unicode CSV natively, making this package potentially obsolete for new projects.
Use it for:
- Maintain legacy Python 2.7 codebases that process CSV files with non-ASCII characters
- Migrate Python 2 CSV code to a compatible layer before upgrading to Python 3
- Work with CSV data containing accented characters or non-Latin scripts in Python 2 environments
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Drop-in replacement for Python 2.7's csv module that handles Unicode strings natively, eliminating encoding errors when reading and writing CSV data.
No for new projects. Python 3's csv module handles Unicode natively. The package is dormant (last release 2015-09-22) with no security vulnerabilities, but installing it on modern Python versions is unlikely to work or be necessary. If you must support Python 2.7 legacy code, it is a reasonable choice given its permissive BSD License and zero dependencies.
Install
unicodecsv on PyPI
pip
pip install unicodecsvuv
uv add unicodecsvpoetry
poetry add unicodecsvInstalling unicodecsv
Before you install
High install friction due to age and Python 2 focus. Last release was 2015-09-22; maintenance is dormant. No runtime dependencies ease installation.
License in practice
BSD License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
import unicodecsv as csv
from io import BytesIO
f = BytesIO()
w = csv.writer(f, encoding='utf-8')
w.writerow((u'é', u'ñ'))
f.seek(0)
r = csv.reader(f, encoding='utf-8')
row = next(r) # [u'é', u'ñ']
Designed for Python 2.6, 2.7, 3.3, 3.4, 3.5, and PyPy 2.4.0. Requires bytestream input (open in 'rb' mode), not text mode.
Verify before relying
- Whether this package is still necessary given Python 3's native Unicode CSV support
- Current compatibility with Python versions beyond 3.5, if any
- Whether the package works reliably on modern Python 3 interpreters despite dormant maintenance
Package facts
| License | BSD License (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 3,979 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,289,635/month — #1,938 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: unicodecsv-0.14.1.tar.gz
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
csv23Provides a Python 3-style unicode CSV API that…
permissive · top 15,000 on PyPI
defusedcsvDefusedcsv is a drop-in replacement for…
permissive · top 5,000 on PyPI
backports.csvProvides Python 3's csv module API for Python…
unclear · top 15,000 on PyPI
clevercsvCleverCSV detects CSV file dialects…
permissive · top 15,000 on PyPI
UnidecodeConverts Unicode text to ASCII-safe…
copyleft · top 1,000 on PyPI
aiocsvProvides async-compatible CSV reading and…
permissive · top 5,000 on PyPI
win_unicode_consoleFixes Unicode input and display in Python when…
permissive · top 15,000 on PyPI
fold-to-asciiConverts Unicode characters outside the basic…
permissive · top 15,000 on PyPI
anyasciiConverts Unicode text to ASCII-only equivalents…
permissive · top 5,000 on PyPI
django-queryset-csvExports Django QuerySet data to CSV format with…
copyleft · top 15,000 on PyPI