Skip to content

MarcinOrlowski/python-flex-text-table

Repository files navigation

Flex Text Table

Fast and flexible Pyhon library for text tables.

Unit tests MD Lint GitHub issues

PyPI version Downloads Python Version License: MIT

Library is also available as PHP package.


Table of contents

  1. Features
  2. Installation & requirements
  3. Examples
  4. License

Features

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

Usage examples

Simples possible usage:

table = FlexTable(['ID', 'NAME', 'SCORE'])
table.add_rows({
    [1, 'John', 12],
    [2, 'Tommy', 15],
})
print(table.render())

would produce nice text table:

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

See more usage examples.


License

  • Written and copyrighted ©2023 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
  • Text Table is open-sourced software licensed under the MIT license

About

Feature rich, fast and flexible Python library for rendering table data as nice text tables.

Resources

License

Stars

Watchers

Forks