Skip to main content

unicodecsv

The unicodecsv is a drop-in replacement for Python 2’s csv module which supports unicode strings without a hassle.

More fully

Python 2’s csv module doesn’t easily deal with unicode strings, leading to the dreaded “‘ascii’ codec can’t encode characters in position …” exception.

You can work around it by encoding everything just before calling write (or just after read), but why not add support to the serializer?

>>> import unicodecsv
>>> from cStringIO import StringIO
>>> f = StringIO()
>>> w = unicodecsv.writer(f, encoding='utf-8')
>>> w.writerow((u'é', u'ñ'))
>>> f.seek(0)
>>> r = unicodecsv.reader(f, encoding='utf-8')
>>> row = r.next()
>>> print row[0], row[1]
é ñ

Metadata

Release files for unicodecsv 0.11.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unicodecsv 0.11.2
File Size Uploaded Provenance Actions
unicodecsv-0.11.2.tar.gz 9.3 kB Without provenance Details for unicodecsv-0.11.2.tar.gz

Release files / unicodecsv-0.11.2.tar.gz

Download URL unicodecsv-0.11.2.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bd75c4a5994031dbb07f4dbd316ec37fe7949af2bb99713cd3e5ef52ffec27b9
BLAKE2b-256 checksum
How to use checksums
6d8375cb0323768537f7e1ebc36132189c03af3c3a3af5b5cf643e0dd28a3d0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for unicodecsv 0.11.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page