Script Python que formata em tabela a saída do `docker ps`
Project description
TabulateDockerPS
TabulateDockerPS é um script Python que transforma a saída do comando docker ps em uma tabela formatada utilizando a biblioteca tabulate. Isso permite que a saída seja visualmente mais organizada e de fácil leitura. O script é simples de usar e pode ser instalado via pipx, tornando-o fácil de integrar em qualquer ambiente de desenvolvimento que utilize Docker.
Instalação
pipx install tabulatedockerps
Uso
Para utilizar o script, simplesmente redirecione a saída do comando docker ps para o script Python:
docker ps | tdps [--tablefmt TABLEFMT]
Exemplo de Saída
Ao executar o comando docker ps e passar a saída para o TabulateDockerPS, você obtém uma tabela formatada, com destaque para a coluna "Ports", que é dividida em várias linhas para facilitar a leitura dos múltiplos mapeamentos de portas. Veja o exemplo abaixo:
$ docker ps | tdps
+----------------+---------+--------------------------+----------------+---------------+------------------------+---------+
| CONTAINER ID | IMAGE | COMMAND | CREATED | STATUS | PORTS | NAMES |
+================+=========+==========================+================+===============+========================+=========+
| 874ace075081 | ubuntu | "bash -c 'while true…" | 37 minutes ago | Up 37 minutes | 0.0.0.0:8080->8080/tcp | ubuntu |
| | | | | | 0.0.0.0:80->80/tcp | |
+----------------+---------+--------------------------+----------------+---------------+------------------------+---------+
Formatos Suportados
O TabulateDockerPS suporta todos os formatos de saída oferecidos pela biblioteca tabulate. Isso inclui, mas não se limita a:
- plain
- grid
- pipe
- orgtbl
- jira
- presto
- pretty
- html
- latex
Para uma lista completa de formatos, consulte a documentação do tabulate.
Contribuição
Contribuições são bem-vindas! Sinta-se à vontade para abrir issues e pull requests para melhorias ou correções.
Licença
Este projeto é distribuído sob a licença MIT. Para mais detalhes, consulte o arquivo LICENSE
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
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 tabulatedockerps-0.3.0.tar.gz.
File metadata
- Download URL: tabulatedockerps-0.3.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.12 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9de5f63185ba9417d35f1af7525ba24709a2e86083d367e12b2fea3b028024ad
|
|
| MD5 |
ac33f20018a15e330f05ce9a39ec6c32
|
|
| BLAKE2b-256 |
05eb738a802b762d212ee1a710c8725f320267d0c712e4ab08d69092939b9959
|
File details
Details for the file tabulatedockerps-0.3.0-py3-none-any.whl.
File metadata
- Download URL: tabulatedockerps-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.12 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f13e9301930c4809bf64d3006bff65d8b37a1559db6b05e59a69e18e76944929
|
|
| MD5 |
2caebb967db06aa073d210583c9fcf2f
|
|
| BLAKE2b-256 |
7181c7fe0defa61390cc5e248c136b67c52a5d40e5d18d32ed9cf9a168a1f6cb
|