{ "info": { "author": "Jacob Rumbolt", "author_email": "rumboltjacob@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# EasyTable\nThe goal of EasyTable is to provide a python module that allows people to easily create a table, change its appearance and add data,\nand allow them to not to have to worry about resizing the table to nicely fit their data. The EasyTable was made by Jacob Rumbolt aka \n'TheGuyFromCanada' or 'TheCanadian'\n\n## Using EasyTable\nEasytable has a few functions that need to be called to create the table, below is sample code to create a table\n\nFirst off import the EasyTable module and create and instance of it\n\n```\nimport easy_table\n\nmyTable = easy_table.EasyTable()\n```\n\nNext set characters for the struture of the table. The parameters for the functions goes as follows:\n\nsetTableCorners(top left, top right, bottom right, bottom left)\nsetTableBorder(vertical border, horizontal border)\nsetTableInnerStructure(vertical, horizontal, intersection)\n\n```\nmyTable.setTableCorners(\"/\", \"\\\\\", \"/\", \"\\\\\")\nmyTable.setTableBorder(\"|\", \"-\")\nmyTable.setTableInnerStructure(\"|\", \"-\", \"+\")\n```\n\nNow set the column titles and data, setColoumns takes an array of strings, and setData takes a 2D array of strings. The parameters are \nas follows:\n\nsetColumns(column title array)\nsetData(data array)\n```\nmyTable.setColumns([\"ID #\", \"Name\", \"Age\"])\ndata = [[\"0\",\"Jeff\",\"31\"],[\"1\",\"Bill\", \"22\"], [\"2\", \"Tim\", \"33\"], [\"3\", \"Timothy\", \"41\"]]\nmyTable.setData(data)\n```\n\nFinally the only thing left is to display the table\n\n```\nmyTable.displayTable()\n```\n\nBelow is what the table would look like:\n\n```\n/----------------\\\n|ID #| NAME |AGE|\n|----+-------+---|\n| 0 | Jeff | 31|\n|----+-------+---|\n| 1 | Bill | 22|\n|----+-------+---|\n| 2 | Tim | 33|\n|----+-------+---|\n| 3 |Timothy| 41|\n\\----------------/\n```\n\nIf you want to sort the table use `sortTable(sortPos)` and give it the position of the column the table will be sorted\noff of, for example to sort the table above based off the ages include the following code\n\n```\nmyTable.sortTable(2)\n```\n\nIn the code above 2 passed for sortPos because the age column is in the second position of the column title array. The sorted\ntable would look like\n\n```\n/----------------\\\n|ID #| NAME |AGE|\n|----+-------+---|\n| 1 | Bill | 22|\n|----+-------+---|\n| 0 | Jeff | 31|\n|----+-------+---|\n| 2 | Tim | 33|\n|----+-------+---|\n| 3 |Timothy| 41|\n\\----------------/\n```\n\nIf you want to search through the table use `searchTable(array, column_num, search_term)` and give it the array to\nsearch in, the column to search within and the value to search for\n\n```\nsearch_result = myTable.searchTable(data, 1, \"Tim\")\nmyTable.setData(search_result)\n```\n\nIn the code above data is the array of data, 1 is the name column within the array and Tim is the term being searched for,\nthe array returned is an array containing the rows of data where the name column has a value containing Tim\n\n```\n/----------------\\\n|ID #| NAME |AGE|\n|----+-------+---|\n| 2 | Tim | 33|\n|----+-------+---|\n| 3 |Timothy| 41|\n\\----------------/\n```\n\nIn case you want to see the characters used in the table call ```showTableProps()```, this will prodice the following:\n\n```\n----TABLE PROPERTIES----\nTable Corners: / \\ / \\\nTable Border: | -\nTable Inner Structure: | - +\n```\n## License\nThe EasyTable project is licensed under the MIT License - see [LICENSE](LICENSE)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/TheGuyFromCanada/EasyTable", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "easy-table", "package_url": "https://pypi.org/project/easy-table/", "platform": "", "project_url": "https://pypi.org/project/easy-table/", "project_urls": { "Homepage": "https://github.com/TheGuyFromCanada/EasyTable" }, "release_url": "https://pypi.org/project/easy-table/3.0.0/", "requires_dist": null, "requires_python": "", "summary": "An easy to use console based table", "version": "3.0.0" }, "last_serial": 3955067, "releases": { "3.0.0": [ { "comment_text": "", "digests": { "md5": "b0d325c5e975e1cb13dcfc81ce4e5347", "sha256": "53d0acbffda57a4c87af96daf12dda3d1eb2b8ec94a99f1e2f3143ce496e03fe" }, "downloads": -1, "filename": "easy_table-3.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b0d325c5e975e1cb13dcfc81ce4e5347", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4656, "upload_time": "2018-06-12T19:17:18", "url": "https://files.pythonhosted.org/packages/a2/22/544654ebb8cace47149955ac6f243b10e982b98cb3f7dc2f2df430ddac6d/easy_table-3.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92f416310c2050b22e1eda036fe6153c", "sha256": "07cc141f1b673dd193b999b03ce4b3e74370b6a96376dea3c38b737a0000be6a" }, "downloads": -1, "filename": "easy_table-3.0.0.tar.gz", "has_sig": false, "md5_digest": "92f416310c2050b22e1eda036fe6153c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4267, "upload_time": "2018-06-12T19:17:19", "url": "https://files.pythonhosted.org/packages/50/1e/0d09abb0c79460a651859394aa219410dffc671b1f1f3013f7fcac63dc30/easy_table-3.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b0d325c5e975e1cb13dcfc81ce4e5347", "sha256": "53d0acbffda57a4c87af96daf12dda3d1eb2b8ec94a99f1e2f3143ce496e03fe" }, "downloads": -1, "filename": "easy_table-3.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b0d325c5e975e1cb13dcfc81ce4e5347", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4656, "upload_time": "2018-06-12T19:17:18", "url": "https://files.pythonhosted.org/packages/a2/22/544654ebb8cace47149955ac6f243b10e982b98cb3f7dc2f2df430ddac6d/easy_table-3.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92f416310c2050b22e1eda036fe6153c", "sha256": "07cc141f1b673dd193b999b03ce4b3e74370b6a96376dea3c38b737a0000be6a" }, "downloads": -1, "filename": "easy_table-3.0.0.tar.gz", "has_sig": false, "md5_digest": "92f416310c2050b22e1eda036fe6153c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4267, "upload_time": "2018-06-12T19:17:19", "url": "https://files.pythonhosted.org/packages/50/1e/0d09abb0c79460a651859394aa219410dffc671b1f1f3013f7fcac63dc30/easy_table-3.0.0.tar.gz" } ] }