PKG-INFO 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. Metadata-Version: 1.1
  2. Name: tablib
  3. Version: 0.12.1
  4. Summary: Format agnostic tabular data library (XLS, JSON, YAML, CSV)
  5. Home-page: http://python-tablib.org
  6. Author: Kenneth Reitz
  7. Author-email: me@kennethreitz.org
  8. License: MIT
  9. Description: Tablib: format-agnostic tabular dataset library
  10. ===============================================
  11. .. image:: https://travis-ci.org/kennethreitz/tablib.svg?branch=master
  12. :target: https://travis-ci.org/kennethreitz/tablib
  13. ::
  14. _____ ______ ___________ ______
  15. __ /_______ ____ /_ ___ /___(_)___ /_
  16. _ __/_ __ `/__ __ \__ / __ / __ __ \
  17. / /_ / /_/ / _ /_/ /_ / _ / _ /_/ /
  18. \__/ \__,_/ /_.___/ /_/ /_/ /_.___/
  19. Tablib is a format-agnostic tabular dataset library, written in Python.
  20. Output formats supported:
  21. - Excel (Sets + Books)
  22. - JSON (Sets + Books)
  23. - YAML (Sets + Books)
  24. - Pandas DataFrames (Sets)
  25. - HTML (Sets)
  26. - TSV (Sets)
  27. - OSD (Sets)
  28. - CSV (Sets)
  29. - DBF (Sets)
  30. Note that tablib *purposefully* excludes XML support. It always will. (Note: This is a joke. Pull requests are welcome.)
  31. Overview
  32. --------
  33. `tablib.Dataset()`
  34. A Dataset is a table of tabular data. It may or may not have a header row. They can be build and manipulated as raw Python datatypes (Lists of tuples|dictionaries). Datasets can be imported from JSON, YAML, DBF, and CSV; they can be exported to XLSX, XLS, ODS, JSON, YAML, DBF, CSV, TSV, and HTML.
  35. `tablib.Databook()`
  36. A Databook is a set of Datasets. The most common form of a Databook is an Excel file with multiple spreadsheets. Databooks can be imported from JSON and YAML; they can be exported to XLSX, XLS, ODS, JSON, and YAML.
  37. Usage
  38. -----
  39. Populate fresh data files: ::
  40. headers = ('first_name', 'last_name')
  41. data = [
  42. ('John', 'Adams'),
  43. ('George', 'Washington')
  44. ]
  45. data = tablib.Dataset(*data, headers=headers)
  46. Intelligently add new rows: ::
  47. >>> data.append(('Henry', 'Ford'))
  48. Intelligently add new columns: ::
  49. >>> data.append_col((90, 67, 83), header='age')
  50. Slice rows: ::
  51. >>> print(data[:2])
  52. [('John', 'Adams', 90), ('George', 'Washington', 67)]
  53. Slice columns by header: ::
  54. >>> print(data['first_name'])
  55. ['John', 'George', 'Henry']
  56. Easily delete rows: ::
  57. >>> del data[1]
  58. Exports
  59. -------
  60. Drumroll please...........
  61. JSON!
  62. +++++
  63. ::
  64. >>> print(data.export('json'))
  65. [
  66. {
  67. "last_name": "Adams",
  68. "age": 90,
  69. "first_name": "John"
  70. },
  71. {
  72. "last_name": "Ford",
  73. "age": 83,
  74. "first_name": "Henry"
  75. }
  76. ]
  77. YAML!
  78. +++++
  79. ::
  80. >>> print(data.export('yaml'))
  81. - {age: 90, first_name: John, last_name: Adams}
  82. - {age: 83, first_name: Henry, last_name: Ford}
  83. CSV...
  84. ++++++
  85. ::
  86. >>> print(data.export('csv'))
  87. first_name,last_name,age
  88. John,Adams,90
  89. Henry,Ford,83
  90. EXCEL!
  91. ++++++
  92. ::
  93. >>> with open('people.xls', 'wb') as f:
  94. ... f.write(data.export('xls'))
  95. DBF!
  96. ++++
  97. ::
  98. >>> with open('people.dbf', 'wb') as f:
  99. ... f.write(data.export('dbf'))
  100. Pandas DataFrame!
  101. +++++++++++++++++
  102. ::
  103. >>> print(data.export('df')):
  104. first_name last_name age
  105. 0 John Adams 90
  106. 1 Henry Ford 83
  107. It's that easy.
  108. Installation
  109. ------------
  110. To install tablib, simply: ::
  111. $ pip install tablib
  112. Make sure to check out `Tablib on PyPi <https://pypi.python.org/pypi/tablib/>`_!
  113. Contribute
  114. ----------
  115. If you'd like to contribute, simply fork `the repository`_, commit your
  116. changes to the **develop** branch (or branch off of it), and send a pull
  117. request. Make sure you add yourself to AUTHORS_.
  118. .. _`the repository`: http://github.com/kennethreitz/tablib
  119. .. _AUTHORS: http://github.com/kennethreitz/tablib/blob/master/AUTHORS
  120. History
  121. -------
  122. 0.11.5 (2017-06-13)
  123. +++++++++++++++++++
  124. - Use ``yaml.safe_load`` for importing yaml.
  125. 0.11.4 (2017-01-23)
  126. +++++++++++++++++++
  127. - Use built-in `json` package if available
  128. - Support Python 3.5+ in classifiers
  129. ** Bugfixes **
  130. - Fixed textual representation for Dataset with no headers
  131. - Handle decimal types
  132. 0.11.3 (2016-02-16)
  133. +++++++++++++++++++
  134. - Release fix.
  135. 0.11.2 (2016-02-16)
  136. +++++++++++++++++++
  137. **Bugfixes**
  138. - Fix export only formats.
  139. - Fix for xlsx output.
  140. 0.11.1 (2016-02-07)
  141. +++++++++++++++++++
  142. **Bugfixes**
  143. - Fixed packaging error on Python 3.
  144. 0.11.0 (2016-02-07)
  145. +++++++++++++++++++
  146. **New Formats!**
  147. - Added LaTeX table export format (``Dataset.latex``).
  148. - Support for dBase (DBF) files (``Dataset.dbf``).
  149. **Improvements**
  150. - New import/export interface (``Dataset.export()``, ``Dataset.load()``).
  151. - CSV custom delimiter support (``Dataset.export('csv', delimiter='$')``).
  152. - Adding ability to remove duplicates to all rows in a dataset (``Dataset.remove_duplicates()``).
  153. - Added a mechanism to avoid ``datetime.datetime`` issues when serializing data.
  154. - New ``detect_format()`` function (mostly for internal use).
  155. - Update the vendored unicodecsv to fix ``None`` handling.
  156. - Only freeze the headers row, not the headers columns (xls).
  157. **Breaking Changes**
  158. - ``detect()`` function removed.
  159. **Bugfixes**
  160. - Fix XLSX import.
  161. - Bugfix for ``Dataset.transpose().transpose()``.
  162. 0.10.0 (2014-05-27)
  163. +++++++++++++++++++
  164. * Unicode Column Headers
  165. * ALL the bugfixes!
  166. 0.9.11 (2011-06-30)
  167. +++++++++++++++++++
  168. * Bugfixes
  169. 0.9.10 (2011-06-22)
  170. +++++++++++++++++++
  171. * Bugfixes
  172. 0.9.9 (2011-06-21)
  173. ++++++++++++++++++
  174. * Dataset API Changes
  175. * ``stack_rows`` => ``stack``, ``stack_columns`` => ``stack_cols``
  176. * column operations have their own methods now (``append_col``, ``insert_col``)
  177. * List-style ``pop()``
  178. * Redis-style ``rpush``, ``lpush``, ``rpop``, ``lpop``, ``rpush_col``, and ``lpush_col``
  179. 0.9.8 (2011-05-22)
  180. ++++++++++++++++++
  181. * OpenDocument Spreadsheet support (.ods)
  182. * Full Unicode TSV support
  183. 0.9.7 (2011-05-12)
  184. ++++++++++++++++++
  185. * Full XLSX Support!
  186. * Pickling Bugfix
  187. * Compat Module
  188. 0.9.6 (2011-05-12)
  189. ++++++++++++++++++
  190. * ``seperators`` renamed to ``separators``
  191. * Full unicode CSV support
  192. 0.9.5 (2011-03-24)
  193. ++++++++++++++++++
  194. * Python 3.1, Python 3.2 Support (same code base!)
  195. * Formatter callback support
  196. * Various bug fixes
  197. 0.9.4 (2011-02-18)
  198. ++++++++++++++++++
  199. * Python 2.5 Support!
  200. * Tox Testing for 2.5, 2.6, 2.7
  201. * AnyJSON Integrated
  202. * OrderedDict support
  203. * Caved to community pressure (spaces)
  204. 0.9.3 (2011-01-31)
  205. ++++++++++++++++++
  206. * Databook duplication leak fix.
  207. * HTML Table output.
  208. * Added column sorting.
  209. 0.9.2 (2010-11-17)
  210. ++++++++++++++++++
  211. * Transpose method added to Datasets.
  212. * New frozen top row in Excel output.
  213. * Pickling support for Datasets and Rows.
  214. * Support for row/column stacking.
  215. 0.9.1 (2010-11-04)
  216. ++++++++++++++++++
  217. * Minor reference shadowing bugfix.
  218. 0.9.0 (2010-11-04)
  219. ++++++++++++++++++
  220. * Massive documentation update!
  221. * Tablib.org!
  222. * Row tagging and Dataset filtering!
  223. * Column insert/delete support
  224. * Column append API change (header required)
  225. * Internal Changes (Row object and use thereof)
  226. 0.8.5 (2010-10-06)
  227. ++++++++++++++++++
  228. * New import system. All dependencies attempt to load from site-packages,
  229. then fallback on tenderized modules.
  230. 0.8.4 (2010-10-04)
  231. ++++++++++++++++++
  232. * Updated XLS output: Only wrap if '\\n' in cell.
  233. 0.8.3 (2010-10-04)
  234. ++++++++++++++++++
  235. * Ability to append new column passing a callable
  236. as the value that will be applied to every row.
  237. 0.8.2 (2010-10-04)
  238. ++++++++++++++++++
  239. * Added alignment wrapping to written cells.
  240. * Added separator support to XLS.
  241. 0.8.1 (2010-09-28)
  242. ++++++++++++++++++
  243. * Packaging Fix
  244. 0.8.0 (2010-09-25)
  245. ++++++++++++++++++
  246. * New format plugin system!
  247. * Imports! ELEGANT Imports!
  248. * Tests. Lots of tests.
  249. 0.7.1 (2010-09-20)
  250. ++++++++++++++++++
  251. * Reverting methods back to properties.
  252. * Windows bug compensated in documentation.
  253. 0.7.0 (2010-09-20)
  254. ++++++++++++++++++
  255. * Renamed DataBook Databook for consistency.
  256. * Export properties changed to methods (XLS filename / StringIO bug).
  257. * Optional Dataset.xls(path='filename') support (for writing on windows).
  258. * Added utf-8 on the worksheet level.
  259. 0.6.4 (2010-09-19)
  260. ++++++++++++++++++
  261. * Updated unicode export for XLS.
  262. * More exhaustive unit tests.
  263. 0.6.3 (2010-09-14)
  264. ++++++++++++++++++
  265. * Added Dataset.append() support for columns.
  266. 0.6.2 (2010-09-13)
  267. ++++++++++++++++++
  268. * Fixed Dataset.append() error on empty dataset.
  269. * Updated Dataset.headers property w/ validation.
  270. * Added Testing Fixtures.
  271. 0.6.1 (2010-09-12)
  272. ++++++++++++++++++
  273. * Packaging hotfixes.
  274. 0.6.0 (2010-09-11)
  275. ++++++++++++++++++
  276. * Public Release.
  277. * Export Support for XLS, JSON, YAML, and CSV.
  278. * DataBook Export for XLS, JSON, and YAML.
  279. * Python Dict Property Support.
  280. Platform: UNKNOWN
  281. Classifier: Development Status :: 5 - Production/Stable
  282. Classifier: Intended Audience :: Developers
  283. Classifier: Natural Language :: English
  284. Classifier: License :: OSI Approved :: MIT License
  285. Classifier: Programming Language :: Python
  286. Classifier: Programming Language :: Python :: 2.7
  287. Classifier: Programming Language :: Python :: 3.3
  288. Classifier: Programming Language :: Python :: 3.4
  289. Classifier: Programming Language :: Python :: 3.5
  290. Classifier: Programming Language :: Python :: 3.6