Library for Python Layouts
Project description
PyLayoutTools (PLT)
Simple library for organising text into boxes and tables.
Boxes
Wrap strings of text in a simple ASCII box. Define the max width to have the text automatically confine to any terminal width.
Example Code
from PyLayoutTools import pltBox
box = pltBox(
"This is a box.",
"It holds a lot of text.",
"If the text is wider than the maxwidth limit (default 80) it'll wrap the text.",
"Neat, huh?")
box.maxwidth = 40
print(box())
Tables
Collate data into a table, with headers.
Example Code
from PyLayoutTools import pltTable
tbl = pltTable(["First Name", "Last Name", "Employee", "Salary"],
["Bart", "Simpson", "12345", "$4,500"],
["John", "Smith", "12346", "$5,000"],
["Steven", "Goldfish", "12347", "$5,000"],
["Paula", "Brown", "12348", "$3,500"],
["James", "Smith", "12349", "$4,500"])
print(tbl())
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
pylayouttools-1.0.0.tar.gz
(15.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylayouttools-1.0.0.tar.gz.
File metadata
- Download URL: pylayouttools-1.0.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
badebb5705c9f3f01a267b21bf9e09dbc26d495a9ac94a656237f30583df076f
|
|
| MD5 |
3ba4c2e47995bcbf9d1bd0b984d06738
|
|
| BLAKE2b-256 |
8c6f9bcfe1f666fbf33d0950313d87854f07f3fd680e532c81002fd057187039
|
File details
Details for the file pylayouttools-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pylayouttools-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb57e23a16969edea7e0f42ad1eeb4291b715e3588c370c6bad222925fae7f1e
|
|
| MD5 |
2c5a2d79d331370955d63bb349356f3b
|
|
| BLAKE2b-256 |
2b0399bbef2d39a063914e6e446c914975120ffe66ce56998d66bf9fdeea00e4
|