flex-text-table


Nameflex-text-table JSON
Version 2.7.0 PyPI version JSON
download
home_pagehttps://github.com/MarcinOrlowski/python-flex-text-table/
SummaryFast and flexible Pyhon library for text tables.
upload_time2023-10-15 14:48:37
maintainer
docs_urlNone
authorMarcin Orlowski
requires_python>=3.8
licenseMIT License
keywords text table ascii command line console shell cli utf8 unicode
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Flex Text Table

```ascii
#####.##....#####.##...##...######.#####.##...##.######...######...#....#####..##....#####
##....##....##.....##.##......##...##.....##.##....##.......##....###...##..##.##....##...
##....##....##......###.......##...##......###.....##.......##...##.##..##..##.##....##...
####..##....####.....#........##...####.....#......##.......##..##...##.#####..##....####.
##....##....##......###.......##...##......###.....##.......##..#######.##..##.##....##...
##....##....##.....##.##......##...##.....##.##....##.......##..##...##.##..##.##....##...
##....#####.#####.##...##.....##...#####.##...##...##.......##..##...##.#####..#####.#####
```

Fast and flexible Pyhon library for text tables.

[![PyPI version](https://badge.fury.io/py/flex-text-table.svg)](https://badge.fury.io/py/flex-text-table)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/flex-text-table?style=plastic)](https://pypi.org/project/flex-text-table/)
[![Python Version](https://img.shields.io/pypi/pyversions/flex-text-table.svg)](https://pypi.org/project/flex-text-table/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

There's also [PHP version of ths library](https://github.com/MarcinOrlowski/php-text-table).

---

## Features

1. Simple API, easy to use,
2. Lightweight (no additional dependencies),
3. Production ready.

---

## Usage example

Simplest possible usage:

```python
from flextable.table import FlexTable       # Import FlexTable root class

table = FlexTable(['ID', 'NAME', 'SCORE'])  # Define table with 3 columns
table.add_rows([
    [1, 'John', 12],                        # Add 2 rows, 3 columns each
    [2, 'Tommy', 15],
])
print(table.render())                       # Render table as string and print
```

would produce nice text table:

```ascii
┌────┬───────┬───────┐
│ ID │ NAME  │ SCORE │
├────┼───────┼───────┤
│ 1  │ John  │ 12    │
│ 2  │ Tommy │ 15    │
└────┴───────┴───────┘
```

See more usage examples in [project docs](https://github.com/MarcinOrlowski/python-flex-text-table/).

---

## License

* Written and copyrighted &copy;2023 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
* Flex Text Table is open-sourced software licensed under
  the [MIT license](http://opensource.org/licenses/MIT)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MarcinOrlowski/python-flex-text-table/",
    "name": "flex-text-table",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "text table ascii command line console shell cli utf8 unicode",
    "author": "Marcin Orlowski",
    "author_email": "mail@marcinOrlowski.com",
    "download_url": "https://files.pythonhosted.org/packages/a9/39/36ef66cbe770e33139c8bee2db78950ee670b7318f3de1e4583a60c067a3/flex-text-table-2.7.0.tar.gz",
    "platform": null,
    "description": "# Flex Text Table\n\n```ascii\n#####.##....#####.##...##...######.#####.##...##.######...######...#....#####..##....#####\n##....##....##.....##.##......##...##.....##.##....##.......##....###...##..##.##....##...\n##....##....##......###.......##...##......###.....##.......##...##.##..##..##.##....##...\n####..##....####.....#........##...####.....#......##.......##..##...##.#####..##....####.\n##....##....##......###.......##...##......###.....##.......##..#######.##..##.##....##...\n##....##....##.....##.##......##...##.....##.##....##.......##..##...##.##..##.##....##...\n##....#####.#####.##...##.....##...#####.##...##...##.......##..##...##.#####..#####.#####\n```\n\nFast and flexible Pyhon library for text tables.\n\n[![PyPI version](https://badge.fury.io/py/flex-text-table.svg)](https://badge.fury.io/py/flex-text-table)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/flex-text-table?style=plastic)](https://pypi.org/project/flex-text-table/)\n[![Python Version](https://img.shields.io/pypi/pyversions/flex-text-table.svg)](https://pypi.org/project/flex-text-table/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\nThere's also [PHP version of ths library](https://github.com/MarcinOrlowski/php-text-table).\n\n---\n\n## Features\n\n1. Simple API, easy to use,\n2. Lightweight (no additional dependencies),\n3. Production ready.\n\n---\n\n## Usage example\n\nSimplest possible usage:\n\n```python\nfrom flextable.table import FlexTable       # Import FlexTable root class\n\ntable = FlexTable(['ID', 'NAME', 'SCORE'])  # Define table with 3 columns\ntable.add_rows([\n    [1, 'John', 12],                        # Add 2 rows, 3 columns each\n    [2, 'Tommy', 15],\n])\nprint(table.render())                       # Render table as string and print\n```\n\nwould produce nice text table:\n\n```ascii\n\u250c\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 ID \u2502 NAME  \u2502 SCORE \u2502\n\u251c\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 1  \u2502 John  \u2502 12    \u2502\n\u2502 2  \u2502 Tommy \u2502 15    \u2502\n\u2514\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\nSee more usage examples in [project docs](https://github.com/MarcinOrlowski/python-flex-text-table/).\n\n---\n\n## License\n\n* Written and copyrighted &copy;2023 by Marcin Orlowski <mail (#) marcinorlowski (.) com>\n* Flex Text Table is open-sourced software licensed under\n  the [MIT license](http://opensource.org/licenses/MIT)\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Fast and flexible Pyhon library for text tables.",
    "version": "2.7.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/MarcinOrlowski/python-flex-table/issues/",
        "Documentation": "https://github.com/MarcinOrlowski/python-flex-table/",
        "Homepage": "https://github.com/MarcinOrlowski/python-flex-text-table/",
        "Source Code": "https://github.com/MarcinOrlowski/python-flex-table/"
    },
    "split_keywords": [
        "text",
        "table",
        "ascii",
        "command",
        "line",
        "console",
        "shell",
        "cli",
        "utf8",
        "unicode"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "460c9c995fdd7736f5caf2a3daeccec354871aed64ea12439da5694a3e5a80dd",
                "md5": "8698e4126337db7cae827dd41868df5f",
                "sha256": "4ae2eb7fdb021f67e251165648df92bd90dc9cac16f77806801f1e1f20aca4c9"
            },
            "downloads": -1,
            "filename": "flex_text_table-2.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8698e4126337db7cae827dd41868df5f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 25966,
            "upload_time": "2023-10-15T14:48:35",
            "upload_time_iso_8601": "2023-10-15T14:48:35.350065Z",
            "url": "https://files.pythonhosted.org/packages/46/0c/9c995fdd7736f5caf2a3daeccec354871aed64ea12439da5694a3e5a80dd/flex_text_table-2.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a93936ef66cbe770e33139c8bee2db78950ee670b7318f3de1e4583a60c067a3",
                "md5": "06cb326529d26903dc3b1e1bfa5ddff0",
                "sha256": "fe9b38456b5a5b12d213f4e73d4e9d37958aef12fbc309f3cbda34512c2c5377"
            },
            "downloads": -1,
            "filename": "flex-text-table-2.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "06cb326529d26903dc3b1e1bfa5ddff0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17848,
            "upload_time": "2023-10-15T14:48:37",
            "upload_time_iso_8601": "2023-10-15T14:48:37.498112Z",
            "url": "https://files.pythonhosted.org/packages/a9/39/36ef66cbe770e33139c8bee2db78950ee670b7318f3de1e4583a60c067a3/flex-text-table-2.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-15 14:48:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MarcinOrlowski",
    "github_project": "python-flex-text-table",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "flex-text-table"
}
        
Elapsed time: 0.13339s