🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

griddle

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

griddle

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

0.0.2
PyPI
Maintainers
1

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  │
╰─────┴─────┴─────╯

Keywords

grid

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts