Una librería simple para formatear listas en tablas.
Project description
Columnator
Columnator es una librería simple para formatear listas en tablas con múltiples columnas en Python. Es útil para mostrar datos de forma ordenada en la terminal, similar al comando column de Bash.
Instalación
Después de subir el paquete a PyPI, puedes instalarlo con:
pip install columnator
Si estás probando localmente antes de subirlo, instálalo con:
pip install .
Uso
from columnator import format_table
data = ["file1.txt", "file2.txt", "file3.txt", "file4.txt", "file5.txt", "file6.txt"]
print(format_table(data, columns=3))
Salida esperada:
file1.txt file3.txt file5.txt
file2.txt file4.txt file6.txt
Parámetros de format_table
data(list): Lista de elementos a mostrar en la tabla.columns(int, opcional): Número de columnas. Por defecto es 3.col_width(int, opcional): Ancho de cada columna. Por defecto es 15.
Contribuir
Si deseas mejorar esta librería, ¡tus contribuciones son bienvenidas! Puedes clonar el repositorio y hacer un pull request.
git clone https://github.com/PanecilloPY/Columnator/
cd Columnator
Licencia
Este proyecto está bajo la licencia MIT.
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
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 columnator-0.1.1.tar.gz.
File metadata
- Download URL: columnator-0.1.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b92ca51406eca44b90b97a2f3e6b13845b9869a7dca2b426ea6bd4f10fc9ee94
|
|
| MD5 |
41255fb02893b7dbfced1bdc86b8d58d
|
|
| BLAKE2b-256 |
e4d8bde2fac7f7f4a5268508c4e8f1bd0493606a3c022efe8b4700512e9aa27d
|
File details
Details for the file columnator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: columnator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9d31831f0c3af79adc73a31961902453632ed1ebb59189290918b84bbe123f3
|
|
| MD5 |
85c92f5ae5d5957e97a01bbab7256164
|
|
| BLAKE2b-256 |
be74d8a2707fbb9984fb383fc887e657ffde143a497e6bbc73154ad2637a423f
|