{"id":19406644,"url":"https://github.com/nirum/tableprint","last_synced_at":"2025-04-05T11:08:47.573Z","repository":{"id":27791255,"uuid":"31280172","full_name":"nirum/tableprint","owner":"nirum","description":"Pretty console printing :clipboard: of tabular data in python :snake:","archived":false,"fork":false,"pushed_at":"2023-11-25T06:47:38.000Z","size":489,"stargazers_count":172,"open_issues_count":4,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-25T11:20:21.617Z","etag":null,"topics":["display","print","python","tabular-data","terminal"],"latest_commit_sha":null,"homepage":"https://tableprint.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nirum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-24T20:25:11.000Z","updated_at":"2024-06-18T17:03:09.220Z","dependencies_parsed_at":"2024-06-18T17:03:07.676Z","dependency_job_id":"5e33b85c-bea6-4352-a288-6c1d15004217","html_url":"https://github.com/nirum/tableprint","commit_stats":{"total_commits":140,"total_committers":9,"mean_commits":"15.555555555555555","dds":0.3142857142857143,"last_synced_commit":"965ce6af3b6adcdecf6a444d60aed7454e22e132"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirum%2Ftableprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirum%2Ftableprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirum%2Ftableprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirum%2Ftableprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirum","download_url":"https://codeload.github.com/nirum/tableprint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["display","print","python","tabular-data","terminal"],"created_at":"2024-11-10T11:43:00.355Z","updated_at":"2025-04-05T11:08:47.545Z","avatar_url":"https://github.com/nirum.png","language":"Python","readme":"# tableprint\n\nPretty console printing :clipboard: of tabular data in python :snake:\n\n![build](https://github.com/nirum/tableprint/workflows/build/badge.svg)\n[![codecov](https://codecov.io/gh/nirum/tableprint/branch/master/graph/badge.svg)](https://codecov.io/gh/nirum/tableprint)\n[![docs](https://readthedocs.org/projects/tableprint/badge/?version=latest)](https://tableprint.readthedocs.io/?badge=latest)\n[![pypi](https://img.shields.io/pypi/v/tableprint.svg)](https://pypi.python.org/pypi/tableprint)\n\n## ℹ︎ About\n\n`tableprint` lets you easily print formatted tables of data.\nUnlike other modules, you can print single rows of data at a time (useful for printing ongoing computation results).\n\n![Example output](https://raw.githubusercontent.com/nirum/tableprint/master/example.png)\n\n## 🔎 Table of Contents\n\n-   [About](#ℹ%EF%B8%8E-about)\n-   [Installation](#-installation)\n-   [Usage](#-usage)\n-   [Documentation](#-documentation)\n-   [Dependencies](#-dependencies)\n-   [Contributors](#heart-contributors)\n-   [Changelog](#-changelog)\n-   [License](#-license)\n\n## 💻 Installation\n\n```bash\npip install tableprint\n```\n\n## 🏃 Usage\n\nThe `table` function takes in a matrix of data, a list of headers, a width (defaults to 11) and a style (defaults to 'round'). To print a dataset consisting of 10 rows of 3 different columns with the default width and style:\n\n```python\nimport tableprint as tp\nimport numpy as np\n\ndata = np.random.randn(10, 3)\nheaders = ['Column A', 'Column B', 'Column C']\n\ntp.table(data, headers)\n```\n\nThe `header` and `row` functions allow you to print just the header or just a row of data, respectively, which is useful for continuously updating a table during a long-running computation. Also, the `banner` function is useful for just printing out a nicely formatted message to the user.\n\nThe `TableContext` context manager is useful for dynamically updating tables (e.g. during a long running computation):\n\n```python\nimport tableprint as tp\nimport numpy as np\nimport time\n\nwith tp.TableContext(\"ABC\") as t:\n    for _ in range(10):\n        time.sleep(0.1)\n        t(np.random.randn(3,))\n```\n\n## 📚 Documentation\n\nHosted at Read The Docs: [tableprint.readthedocs.org](http://tableprint.readthedocs.org)\n\n## 📦 Dependencies\n\n-   Python 3.6+\n-   [wcwidth](https://pypi.org/project/wcwidth/)\n\n## :heart: Contributors\n\nThanks to: [@nowox](https://github.com/nowox), [@nicktimko](https://github.com/nicktimko), [@mubaris](https://github.com/mubaris), and [@sumanthratna](https://github.com/sumanthratna) for contributions.\n\n## 🛠 Changelog\n\n| Version | Release Date | Description                                                                                                                                                                                                     |\n| ------: | :----------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n|   0.9.1 |  Aug 9 2020 | Drops python2 support. |\n|   0.9.0 |  May 16 2020 | Adds support for automatically determining the table's width.                                                                                                                                                   |\n|   0.8.0 |  Oct 24 2017 | Improves support for international languages, removes numpy dependency                                                                                                                                          |\n|   0.7.0 |  May 26 2017 | Adds a TableContext context manager for easy creation of dynamic tables (tables that update periodically). Adds the ability to pass a list or tuple of widths to specify different widths for different columns |\n|   0.6.9 |  May 25 2017 | Splitting the tableprint.py module into a pacakge with multiple files                                                                                                                                           |\n|   0.6.7 |  May 25 2017 | Fixes some bugs with ANSI escape sequences                                                                                                                                                                      |\n|   0.5.0 | Sept 29 2016 | Better handling of ANSI escape sequences in table rows                                                                                                                                                          |\n|   0.4.0 |  May 3 2016  | Adds a 'block' style                                                                                                                                                                                            |\n|   0.3.2 |  May 3 2016  | Adds a test suite                                                                                                                                                                                               |\n|   0.3.0 |  May 3 2016  | Adds custom styles for tables, specified by a key ('fancy_grid', 'grid', etc.)                                                                                                                                  |\n|   0.2.0 |  May 2 2016  | Adds better python2 (unicode/bytes) compatibility                                                                                                                                                               |\n|   0.1.5 |  Oct 1 2015  | Renamed hrtime to humantime, added docs                                                                                                                                                                         |\n|   0.1.4 | Sept 28 2015 | Added human readable string converter (hrtime)                                                                                                                                                                  |\n|   0.1.0 |  Feb 24 2015 | Initial release                                                                                                                                                                                                 |\n\n## 🔓 License\n\nMIT. See [`LICENSE.md`](./LICENSE.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirum%2Ftableprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirum%2Ftableprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirum%2Ftableprint/lists"}