{ "info": { "author": "Stefan Tatschner", "author_email": "stefan@sevenbyte.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "plaintable\n==========\n\nPlaintable is a very simple library to build plain text tables. It has been\ncreated to provide a very lightweight and clear interface for generating plain\ntext tables. Some data can be customized e.g. alignment, padding and\nfloatprecision. Every data item is to be converted to string automatically.\n\n\nUsage\n-----\n\n.. code-block:: pycon\n\n >>> from plaintable import Table\n >>> data = [\n ... [1, 2, 3, 4, 5],\n ... [10, 11, 12, 13, 14],\n ... ['a', 'b', 'c', 'd', 'e'],\n ... [1.0, 2.0, 1.5, 4.25, 10.50],\n ... ]\n >>> headline = ['one', 'two', 'three', 'four', 'five']\n >>> table = Table(data, headline)\n >>> print(table)\n one two three four five\n ---- ---- ----- ---- -----\n 1 2 3 4 5\n 10 11 12 13 14\n a b c d e\n 1.00 2.00 1.50 4.25 10.50\n\n\nCustomise\n---------\n\nThe table layout can be customised by passing several keyword arguments\nto ``Table.__init__()``.\n\nheadline\n A list of strings which will appear as column headers. This argument\n is optional.\n\n **Default: None**\nalign\n You can specifiy the alignment of the table ('l', 'r', 'c').\n\n **Default: 'l'**\npadding\n If you need a wider table you can increase the padding.\n\n **Default: 2**\nfloatprec\n Every float value is converted to ``str`` with this precision.\n\n **Default: 2**\nheader_padding\n Adds extra spaces around header fields.\n\n **Default: 0**\ndatetimefs\n Specifies the datetime formatstring. Any datetime object is converted\n to a string refering to this formatstring; see also here_.\n\n **Default:** ``%Y-%m-%d %H:%M``\n\n.. _here: https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior\n\n\nFurther Examples\n----------------\n\n.. code-block:: pycon\n\n >>> from plaintable import Table\n >>> data = [\n ... [1, 2, 3, 4, 5],\n ... [10, 11, 12, 13, 14],\n ... ['a', 'b', 'c', 'd', 'e'],\n ... [1.0, 2.0, 1.5, 4.25, 10.50],\n ... ]\n >>> headline = ['one', 'two', 'three', 'four', 'five']\n >>> table = Table(data, headline, align='r', padding=4, floatprec=4)\n >>> print(table)\n one two three four five\n ------ ------ ------ ------ -------\n 1 2 3 4 5\n 10 11 12 13 14\n a b c d e\n 1.0000 2.0000 1.5000 4.2500 10.5000\n\n\n.. code-block:: pycon\n\n >>> from plaintable import Table\n >>> data = [\n ... [1, 2, 3, 4, 5],\n ... [10, 11, 12, 13, 14],\n ... ['a', 'b', 'c', 'd', 'e'],\n ... [1.0, 2.0, 1.5, 4.25, 10.50],\n ... ]\n >>> table = Table(data)\n >>> print(table)\n 1 2 3 4 5\n 10 11 12 13 14\n a b c d e\n 1.00 2.00 1.50 4.25 10.50\n\n\n.. code-block:: pycon\n\n >>> from plaintable import Table\n >>> data = [\n ... [1, 2, 3, 4, 5],\n ... [10, 11, 12, 13, 14],\n ... ['a', 'b', 'c', 'd', 'e'],\n ... [1.0, 2.0, 1.5, 4.25, 10.50],\n ... ]\n >>> table = Table(data, padding=4)\n >>> print(table)\n 1 2 3 4\n 10 11 12 13\n a b c d\n 1.00 2.00 1.50 4.25\n\n\n.. code-block:: pycon\n\n >>> from plaintable import Table\n >>> data = [\n ... [1, 2, 3, 4, 5],\n ... [10, 11, 12, 13, 14],\n ... ['a', 'b', 'c', 'd', 'e'],\n ... [1.0, 2.0, 1.5, 4.25, 10.50],\n ... ]\n >>> table = Table(data, header_padding=4)\n >>> print(table)\n one two three four\n ----------- ----------- ------------- ------------\n 1 2 3 4\n 10 11 12 13\n a b c d\n 1.00 2.00 1.50 4.25", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rumpelsepp/plaintable", "keywords": "table development", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "plaintable", "package_url": "https://pypi.org/project/plaintable/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/plaintable/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/rumpelsepp/plaintable" }, "release_url": "https://pypi.org/project/plaintable/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "A simple library to build plain text tables", "version": "0.1.1" }, "last_serial": 1255146, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6adc413a2a92250b68855c88deae7515", "sha256": "c742a21373fb258bf50dee845aab98372c28de7c45e8dab5830d2b32d3a9165d" }, "downloads": -1, "filename": "plaintable-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6adc413a2a92250b68855c88deae7515", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4595, "upload_time": "2014-06-17T09:32:47", "url": "https://files.pythonhosted.org/packages/fe/9e/70d99cd500d6bba245fbec0a1c8ddbc4bd9c87b366e4ec531b745350de82/plaintable-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "dc416d957ffdc64db5c979f7cb9b54b6", "sha256": "7ac1948e2a49a98dbb72d8c68d53c3e6e8dfb571009a9a7cf7bf18e94b9e482e" }, "downloads": -1, "filename": "plaintable-0.1.1.tar.gz", "has_sig": false, "md5_digest": "dc416d957ffdc64db5c979f7cb9b54b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4835, "upload_time": "2014-10-11T11:44:56", "url": "https://files.pythonhosted.org/packages/fc/3e/948a6007ef6fdbcfe9a228b8e3c46b75c86c40a60acf1909438b6adb9d5a/plaintable-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dc416d957ffdc64db5c979f7cb9b54b6", "sha256": "7ac1948e2a49a98dbb72d8c68d53c3e6e8dfb571009a9a7cf7bf18e94b9e482e" }, "downloads": -1, "filename": "plaintable-0.1.1.tar.gz", "has_sig": false, "md5_digest": "dc416d957ffdc64db5c979f7cb9b54b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4835, "upload_time": "2014-10-11T11:44:56", "url": "https://files.pythonhosted.org/packages/fc/3e/948a6007ef6fdbcfe9a228b8e3c46b75c86c40a60acf1909438b6adb9d5a/plaintable-0.1.1.tar.gz" } ] }