PyPortable Installer
Uma ferramenta CLI e biblioteca Python para baixar, configurar e gerenciar instalações do Python Portable (Embeddable) automaticamente. Ideal para criar ambientes Python isolados para distribuição, sem instalação administrativa.
Funcionalidades
- Versões sempre atualizadas — a lista de versões é lida em tempo real do feed oficial do python.org (com cache local), nada de lista fixa no código.
- Multi-arquitetura — builds
amd64(64 bits),win32(32 bits) earm64, com detecção automática da sua máquina. - Download inteligente — barra de progresso, retry automático, cache dos instaladores e verificação de checksum quando o python.org publica um.
- Fallback de releases source-only — quando uma versão só tem código-fonte (sem binário para Windows), o PyPortable cai automaticamente para o patch mais novo que realmente possui build.
- Pip pronto para uso — instala
pip,setuptoolsewheel, e já configura o._pthe osite-packages. - Scripts de ativação — gera
activate.ps1eactivate.batjunto da instalação. - Diagnóstico e limpeza —
doctor,uninstallecleanintegrados. - CLI moderna — Typer + Rich, com cores, tabelas e ajuda navegável.
Instalação
pip install pyportable
Desenvolvimento
git clone https://github.com/DaavidSiilva/PyPortable
cd PyPortable
pip install -e ".[dev]"
pytest
Uso
Listar versões disponíveis
pyportable list # versões estáveis
pyportable list --all # inclui alpha/beta/rc
pyportable list --check # confirma no python.org quais builds existem
pyportable list --json # saída para scripts
Instalar
pyportable install latest # instala na pasta .python
pyportable install 3.12 # série mais recente disponível
pyportable install 3.12.10 # versão exata
pyportable install 3.12 --arch 32 # força 32 bits
pyportable install 3.12 --dir .venv # pasta customizada
pyportable install 3.12 --dry-run # mostra o plano sem baixar
pyportable install 3.12 --force # substitui instalação existente
Atalho: pyportable 3.12 é equivalente a pyportable install 3.12.
Gerenciar
pyportable doctor # checa a instalação atual
pyportable uninstall --yes # remove a instalação
pyportable clean --yes # limpa o cache de downloads
pyportable version # versão do PyPortable
Ativar o ambiente
Depois de instalar, use os scripts gerados:
# PowerShell
.\.python\activate.ps1
:: CMD
.python\activate.bat
Uso como biblioteca
from pyportable import install, doctor, uninstall
result = install("3.12", arch="64", dest=".python")
print(result.python_exe) # .python\python.exe
report = doctor(".python")
if not report.ok:
print(report.issues)
uninstall(".python")
Opções da CLI
| Comando | Descrição |
|---|---|
list |
Lista versões publicadas no python.org |
install |
Baixa, extrai e configura uma instalação portátil |
doctor |
Inspeciona uma instalação e aponta problemas |
uninstall |
Remove uma instalação |
clean |
Limpa o cache local (zips e feed de versões) |
version |
Mostra a versão do PyPortable |
Use pyportable <comando> --help para ver todas as flags.
Estrutura do Projeto
pyportable/cli.py— interface de linha de comando (Typer + Rich).releases.py— descoberta e resolução de versões no python.org.downloader.py— download com progresso, retry e checksum.installer.py— instalação, desinstalação e diagnóstico.config.py— constantes e caminhos._console.py— tema e helpers de saída.
tests/— suíte de testes com pytest.
Publicação
O caminho recomendado é Trusted Publishing (OIDC), sem tokens armazenados:
crie uma tag (vX.Y.Z) e o workflow .github/workflows/publish.yml cuida do resto.
Para publicar manualmente com o Twine:
python -m build
twine upload dist/* # usa TWINE_USERNAME / TWINE_PASSWORD do ambiente
TWINE_USERNAME costuma ser __token__ e TWINE_PASSWORD, o API token do PyPI.
Licença
MIT
Metadata
Release files for pyportable 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyportable-0.3.0.tar.gz | 23.9 kB | Without provenance | Details for pyportable-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyportable-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for pyportable-0.3.0-py3-none-any.whl |
Total release size: 45.6 kB
Release files / pyportable-0.3.0.tar.gz
| Download URL | pyportable-0.3.0.tar.gz |
|---|---|
| Size | 23.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17ba26f68f6e927db807424f5ee813118ad44722f453f1d1317c6af33dcf5104
|
|
BLAKE2b-256 checksum How to use checksums |
f12787d53277784972238cd7b326e12069d58c8dff3a6506baabd97d70d4cc14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / pyportable-0.3.0-py3-none-any.whl
| Download URL | pyportable-0.3.0-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f138690ae0a0f2185bfee5ca3860b62aeb13acf9bebdce08a1c09c730e652bb2
|
|
BLAKE2b-256 checksum How to use checksums |
92a503d966da0d947af3ace7968ed219cc7eb86c99aec3c02b88b67ea3534cb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for pyportable 0.3.0
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.