PKG-INFO 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. Metadata-Version: 1.1
  2. Name: unicodecsv
  3. Version: 0.14.1
  4. Summary: Python2's stdlib csv module is nice, but it doesn't support unicode. This module is a drop-in replacement which *does*.
  5. Home-page: https://github.com/jdunck/python-unicodecsv
  6. Author: Jeremy Dunck
  7. Author-email: jdunck@gmail.com
  8. License: BSD License
  9. Description: unicodecsv
  10. ==========
  11. The unicodecsv is a drop-in replacement for Python 2.7's csv module which supports unicode strings without a hassle. Supported versions are python 2.7, 3.3, 3.4, 3.5, and pypy 2.4.0.
  12. More fully
  13. ----------
  14. 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.
  15. You can work around it by encoding everything just before calling write (or just after read), but why not add support to the serializer?
  16. .. code-block:: pycon
  17. >>> import unicodecsv as csv
  18. >>> from io import BytesIO
  19. >>> f = BytesIO()
  20. >>> w = csv.writer(f, encoding='utf-8')
  21. >>> _ = w.writerow((u'é', u'ñ'))
  22. >>> _ = f.seek(0)
  23. >>> r = csv.reader(f, encoding='utf-8')
  24. >>> next(r) == [u'é', u'ñ']
  25. True
  26. Note that unicodecsv expects a bytestream, not unicode -- so there's no need to use `codecs.open` or similar wrappers. Plain `open(..., 'rb')` will do.
  27. (Version 0.14.0 dropped support for python 2.6, but 0.14.1 added it back. See c0b7655248c4249 for the mistaken, breaking change.)
  28. Platform: UNKNOWN
  29. Classifier: Development Status :: 5 - Production/Stable
  30. Classifier: Intended Audience :: Developers
  31. Classifier: License :: OSI Approved :: BSD License
  32. Classifier: Natural Language :: English
  33. Classifier: Programming Language :: Python :: 2.6
  34. Classifier: Programming Language :: Python :: 2.7
  35. Classifier: Programming Language :: Python :: 3.3
  36. Classifier: Programming Language :: Python :: 3.4
  37. Classifier: Programming Language :: Python :: 3.5
  38. Classifier: Programming Language :: Python :: Implementation :: PyPy
  39. Classifier: Programming Language :: Python :: Implementation :: CPython