PKG-INFO 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. Metadata-Version: 1.1
  2. Name: tablib
  3. Version: 0.10.0
  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=develop
  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. - HTML (Sets)
  25. - TSV (Sets)
  26. - CSV (Sets)
  27. Note that tablib *purposefully* excludes XML support. It always will. (Note: This is a joke. Pull requests are welcome.)
  28. Overview
  29. --------
  30. `tablib.Dataset()`
  31. 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, and CSV; they can be exported to XLSX, XLS, ODS, JSON, YAML, CSV, TSV, and HTML.
  32. `tablib.Databook()`
  33. 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.
  34. Usage
  35. -----
  36. Populate fresh data files: ::
  37. headers = ('first_name', 'last_name')
  38. data = [
  39. ('John', 'Adams'),
  40. ('George', 'Washington')
  41. ]
  42. data = tablib.Dataset(*data, headers=headers)
  43. Intelligently add new rows: ::
  44. >>> data.append(('Henry', 'Ford'))
  45. Intelligently add new columns: ::
  46. >>> data.append_col((90, 67, 83), header='age')
  47. Slice rows: ::
  48. >>> print data[:2]
  49. [('John', 'Adams', 90), ('George', 'Washington', 67)]
  50. Slice columns by header: ::
  51. >>> print data['first_name']
  52. ['John', 'George', 'Henry']
  53. Easily delete rows: ::
  54. >>> del data[1]
  55. Exports
  56. -------
  57. Drumroll please...........
  58. JSON!
  59. +++++
  60. ::
  61. >>> print data.json
  62. [
  63. {
  64. "last_name": "Adams",
  65. "age": 90,
  66. "first_name": "John"
  67. },
  68. {
  69. "last_name": "Ford",
  70. "age": 83,
  71. "first_name": "Henry"
  72. }
  73. ]
  74. YAML!
  75. +++++
  76. ::
  77. >>> print data.yaml
  78. - {age: 90, first_name: John, last_name: Adams}
  79. - {age: 83, first_name: Henry, last_name: Ford}
  80. CSV...
  81. ++++++
  82. ::
  83. >>> print data.csv
  84. first_name,last_name,age
  85. John,Adams,90
  86. Henry,Ford,83
  87. EXCEL!
  88. ++++++
  89. ::
  90. >>> with open('people.xls', 'wb') as f:
  91. ... f.write(data.xls)
  92. It's that easy.
  93. Installation
  94. ------------
  95. To install tablib, simply: ::
  96. $ pip install tablib
  97. Or, if you absolutely must: ::
  98. $ easy_install tablib
  99. Contribute
  100. ----------
  101. If you'd like to contribute, simply fork `the repository`_, commit your
  102. changes to the **develop** branch (or branch off of it), and send a pull
  103. request. Make sure you add yourself to AUTHORS_.
  104. .. _`the repository`: http://github.com/kennethreitz/tablib
  105. .. _AUTHORS: http://github.com/kennethreitz/tablib/blob/master/AUTHORS
  106. History
  107. -------
  108. ++++
  109. * Unicode Column Headers
  110. 0.9.11 (2011-06-30)
  111. +++++++++++++++++++
  112. * Bugfixes
  113. 0.9.10 (2011-06-22)
  114. +++++++++++++++++++
  115. * Bugfixes
  116. 0.9.9 (2011-06-21)
  117. ++++++++++++++++++
  118. * Dataset API Changes
  119. * ``stack_rows`` => ``stack``, ``stack_columns`` => ``stack_cols``
  120. * column operations have their own methods now (``append_col``, ``insert_col``)
  121. * List-style ``pop()``
  122. * Redis-style ``rpush``, ``lpush``, ``rpop``, ``lpop``, ``rpush_col``, and ``lpush_col``
  123. 0.9.8 (2011-05-22)
  124. ++++++++++++++++++
  125. * OpenDocument Spreadsheet support (.ods)
  126. * Full Unicode TSV support
  127. 0.9.7 (2011-05-12)
  128. ++++++++++++++++++
  129. * Full XLSX Support!
  130. * Pickling Bugfix
  131. * Compat Module
  132. 0.9.6 (2011-05-12)
  133. ++++++++++++++++++
  134. * ``seperators`` renamed to ``separators``
  135. * Full unicode CSV support
  136. 0.9.5 (2011-03-24)
  137. ++++++++++++++++++
  138. * Python 3.1, Python 3.2 Support (same code base!)
  139. * Formatter callback support
  140. * Various bug fixes
  141. 0.9.4 (2011-02-18)
  142. ++++++++++++++++++
  143. * Python 2.5 Support!
  144. * Tox Testing for 2.5, 2.6, 2.7
  145. * AnyJSON Integrated
  146. * OrderedDict support
  147. * Caved to community pressure (spaces)
  148. 0.9.3 (2011-01-31)
  149. ++++++++++++++++++
  150. * Databook duplication leak fix.
  151. * HTML Table output.
  152. * Added column sorting.
  153. 0.9.2 (2010-11-17)
  154. ++++++++++++++++++
  155. * Transpose method added to Datasets.
  156. * New frozen top row in Excel output.
  157. * Pickling support for Datasets and Rows.
  158. * Support for row/column stacking.
  159. 0.9.1 (2010-11-04)
  160. ++++++++++++++++++
  161. * Minor reference shadowing bugfix.
  162. 0.9.0 (2010-11-04)
  163. ++++++++++++++++++
  164. * Massive documentation update!
  165. * Tablib.org!
  166. * Row tagging and Dataset filtering!
  167. * Column insert/delete support
  168. * Column append API change (header required)
  169. * Internal Changes (Row object and use thereof)
  170. 0.8.5 (2010-10-06)
  171. ++++++++++++++++++
  172. * New import system. All dependencies attempt to load from site-packages,
  173. then fallback on tenderized modules.
  174. 0.8.4 (2010-10-04)
  175. ++++++++++++++++++
  176. * Updated XLS output: Only wrap if '\\n' in cell.
  177. 0.8.3 (2010-10-04)
  178. ++++++++++++++++++
  179. * Ability to append new column passing a callable
  180. as the value that will be applied to every row.
  181. 0.8.2 (2010-10-04)
  182. ++++++++++++++++++
  183. * Added alignment wrapping to written cells.
  184. * Added separator support to XLS.
  185. 0.8.1 (2010-09-28)
  186. ++++++++++++++++++
  187. * Packaging Fix
  188. 0.8.0 (2010-09-25)
  189. ++++++++++++++++++
  190. * New format plugin system!
  191. * Imports! ELEGANT Imports!
  192. * Tests. Lots of tests.
  193. 0.7.1 (2010-09-20)
  194. ++++++++++++++++++
  195. * Reverting methods back to properties.
  196. * Windows bug compensated in documentation.
  197. 0.7.0 (2010-09-20)
  198. ++++++++++++++++++
  199. * Renamed DataBook Databook for consistency.
  200. * Export properties changed to methods (XLS filename / StringIO bug).
  201. * Optional Dataset.xls(path='filename') support (for writing on windows).
  202. * Added utf-8 on the worksheet level.
  203. 0.6.4 (2010-09-19)
  204. ++++++++++++++++++
  205. * Updated unicode export for XLS.
  206. * More exhaustive unit tests.
  207. 0.6.3 (2010-09-14)
  208. ++++++++++++++++++
  209. * Added Dataset.append() support for columns.
  210. 0.6.2 (2010-09-13)
  211. ++++++++++++++++++
  212. * Fixed Dataset.append() error on empty dataset.
  213. * Updated Dataset.headers property w/ validation.
  214. * Added Testing Fixtures.
  215. 0.6.1 (2010-09-12)
  216. ++++++++++++++++++
  217. * Packaging hotfixes.
  218. 0.6.0 (2010-09-11)
  219. ++++++++++++++++++
  220. * Public Release.
  221. * Export Support for XLS, JSON, YAML, and CSV.
  222. * DataBook Export for XLS, JSON, and YAML.
  223. * Python Dict Property Support.
  224. Platform: UNKNOWN
  225. Classifier: Development Status :: 5 - Production/Stable
  226. Classifier: Intended Audience :: Developers
  227. Classifier: Natural Language :: English
  228. Classifier: License :: OSI Approved :: MIT License
  229. Classifier: Programming Language :: Python
  230. Classifier: Programming Language :: Python :: 2.5
  231. Classifier: Programming Language :: Python :: 2.6
  232. Classifier: Programming Language :: Python :: 2.7
  233. Classifier: Programming Language :: Python :: 3.0
  234. Classifier: Programming Language :: Python :: 3.1
  235. Classifier: Programming Language :: Python :: 3.2
  236. Classifier: Programming Language :: Python :: 3.3
  237. Classifier: Programming Language :: Python :: 3.4