Skip to main content

Turn an interable into a printable grid with dynamically controlled column sizes to shrink grid width to your terminal size.

Project description

griddle

Turn tabular data into a printable grid.
Wraps the tabulate to streamline usage as well as automatically reduce column widths to fit the grid to the current terminal width.

Installation

Install with:

pip install griddle

Usage

>>> from griddle import griddy
>>> data = [{"a": i, "b": i+1, "c": i+2} for i in range(10)]
>>> print(griddy(data, "keys"))
╭─────┬─────┬─────╮
│ a   │ b   │ c   │
├─────┼─────┼─────┤
│ 0   │ 1   │ 2   │
├─────┼─────┼─────┤
│ 1   │ 2   │ 3   │
├─────┼─────┼─────┤
│ 2   │ 3   │ 4   │
├─────┼─────┼─────┤
│ 3   │ 4   │ 5   │
├─────┼─────┼─────┤
│ 4   │ 5   │ 6   │
├─────┼─────┼─────┤
│ 5   │ 6   │ 7   │
├─────┼─────┼─────┤
│ 6   │ 7   │ 8   │
├─────┼─────┼─────┤
│ 7   │ 8   │ 9   │
├─────┼─────┼─────┤
│ 8   │ 9   │ 10  │
├─────┼─────┼─────┤
│ 9   │ 10  │ 11  │
╰─────┴─────┴─────╯

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

griddle-0.0.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

griddle-0.0.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file griddle-0.0.2.tar.gz.

File metadata

  • Download URL: griddle-0.0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for griddle-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f69764b7ab6fac97168108955f708833cde26513ad076989ea556ceb7aea7113
MD5 4dd281c921e71986ba4617955727919c
BLAKE2b-256 8a54ea6a7647ec4d1be981165a77356d18e3c1ddfd52a2b65127f2884ba7a7e9

See more details on using hashes here.

File details

Details for the file griddle-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: griddle-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for griddle-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 17da223b098368f842abe0645250319197fadf442a8300ebe86c74da73320730
MD5 4f2363bbacba6040299123f82b8ad8cb
BLAKE2b-256 b053306b70a762e83e7b8d65a7043d4ad5cc14dfc2315f4fdd62058689aefba7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page