PKG-INFO 13 KB

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