Skip to main content

Tangly is a modules that allows you to print beautifull tables in python

To install:

pip install tangly

To import into your code:

import tangly

Say we have a nested list with information about people:

people = [["Name", "Last Name", 'Age', "Number"],
	   ["Nath", "Dezem", '20', '137'],
	   ["Rafa", "Rayes",'19', '4976'],
       ['Johny', 'Dias', '22', '1234']]

If we want to display it as a table we can use:

print_table(people)

Output:

┌───────┬──────────────────────────┐
│ Name  │ Last Name   Age   Number │
├───────┼──────────────────────────┤
│ Nath  │ Dezem       20    137    │
│ Rafa  │ Rayes       19    4976   │
│ Johny │ Dias        22    1234   │
└───────┴──────────────────────────┘

If you only want to save the result you can get the string with make_table() print_table() is equivalent to print(make_table())

You can controll which collumns and rows are separated using a similar nested list, like so [[0,2],[0,1]] . By default this is [[0],[0]] which means only the first row and first collumn are separated.

print_table(my_list, [[0,2],[0,1]])

This will be the output:

┌───────┬───────────┬──────────────┐
│ Name  │ Last Name │ Age   Number │
├───────┼───────────┼──────────────┤
│ Nath  │ Dezem     │ 20    137    │
│ Rafa  │ Rayes     │ 19    4976   │
├───────┼───────────┼──────────────┤
│ Johny │ Dias      │ 22    1234   │
└───────┴───────────┴──────────────┘

This was done in 2019 when I was learning python. I know no one will ever use this. Updated in 2024 just to fix it.

Metadata

Release files for Tangly 5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for Tangly 5.1
File Interpreter ABI Platform
Tangly-5.1-py3-none-any.whl Python 3 none any Details

Release files / Tangly-5.1-py3-none-any.whl

Download URL Tangly-5.1-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
701a708935b26cf7b3a52296b7b811d91db134d02a9e172a6d77ffa22cda74c8
BLAKE2b-256 checksum
How to use checksums
ece0e463db3c6e5fe6adbd0d147e35bd5b8ff6127186fc393e2b88ff5085ff4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Security for Tangly 5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

5.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page