Fast and flexible Pyhon library for text tables.
Project description
Flex Text Table
#####.##....#####.##...##...######.#####.##...##.######...######...#....#####..##....#####
##....##....##.....##.##......##...##.....##.##....##.......##....###...##..##.##....##...
##....##....##......###.......##...##......###.....##.......##...##.##..##..##.##....##...
####..##....####.....#........##...####.....#......##.......##..##...##.#####..##....####.
##....##....##......###.......##...##......###.....##.......##..#######.##..##.##....##...
##....##....##.....##.##......##...##.....##.##....##.......##..##...##.##..##.##....##...
##....#####.#####.##...##.....##...#####.##...##...##.......##..##...##.#####..#####.#####
Fast and flexible Pyhon library for text tables.
There's also PHP version of ths library.
Features
- Simple API, easy to use,
- Lightweight (no additional dependencies),
- Production ready.
Usage example
Simplest possible usage:
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:
┌────┬───────┬───────┐
│ ID │ NAME │ SCORE │
├────┼───────┼───────┤
│ 1 │ John │ 12 │
│ 2 │ Tommy │ 15 │
└────┴───────┴───────┘
See more usage examples in project docs.
License
- Written and copyrighted ©2023 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
- Flex Text Table is open-sourced software licensed under the MIT license
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flex-text-table-2.7.0.tar.gz
(17.8 kB
view details)
Built Distribution
File details
Details for the file flex-text-table-2.7.0.tar.gz
.
File metadata
- Download URL: flex-text-table-2.7.0.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe9b38456b5a5b12d213f4e73d4e9d37958aef12fbc309f3cbda34512c2c5377 |
|
MD5 | 06cb326529d26903dc3b1e1bfa5ddff0 |
|
BLAKE2b-256 | a93936ef66cbe770e33139c8bee2db78950ee670b7318f3de1e4583a60c067a3 |
File details
Details for the file flex_text_table-2.7.0-py3-none-any.whl
.
File metadata
- Download URL: flex_text_table-2.7.0-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ae2eb7fdb021f67e251165648df92bd90dc9cac16f77806801f1e1f20aca4c9 |
|
MD5 | 8698e4126337db7cae827dd41868df5f |
|
BLAKE2b-256 | 460c9c995fdd7736f5caf2a3daeccec354871aed64ea12439da5694a3e5a80dd |