Skip to main content

rtcloud (Python)

Biblioteca oficial da RTCloud para Python. Controle aplicações, arquivos, variáveis, snapshots, bancos de dados e equipes pelo seu código — a mesma API pública que a CLI e a extensão do VS Code usam.

  • Só biblioteca padrão: nenhuma dependência.
  • Python 3.8 ou mais novo, com tipos.
  • Repete sozinha quando a RTCloud está publicando uma atualização (503) e quando uma leitura bate no limite (429).

Instalação

pip install rtcloud

Primeiros passos

Gere uma chave no painel (menu da conta → Chaves de API) e guarde em RTCLOUD_API_KEY.

from rtcloud import RTCloud

rt = RTCloud()  # lê RTCLOUD_API_KEY

for app in rt.apps.list():
    print(app["name"], "no ar" if app["online"] else "parada")

rt.apps.restart("meu-bot")  # aceita o id ou o nome exato

Exemplos

# publicar uma versão nova
with open("projeto.zip", "rb") as f:
    rt.apps.commit("minha-api", f.read())

# buscar texto em todos os arquivos
r = rt.files.search("meu-bot", "DISCORD_TOKEN", ext="py")
for f in r["files"]:
    print(f["path"], f["matches"])

# trocar um trecho de arquivo e reiniciar
rt.files.edit("meu-bot", "config.py", [{"old": 'PREFIXO = "!"', "new": 'PREFIXO = "?"'}])
rt.apps.restart("meu-bot")

# variáveis: grava só as enviadas
rt.envs.set("minha-api", {"LOG_LEVEL": "debug"})

# restaurar o snapshot mais novo e esperar terminar
ultimo = rt.snapshots.list("minha-api")[0]
rt.snapshots.restore_and_wait("minha-api", ultimo["version"])

Erros

from rtcloud import RTCloudError

try:
    rt.apps.get("nao-existe")
except RTCloudError as e:
    print(e.status, e.code, e.message)  # 404 NOT_FOUND Aplicação não encontrada.

Segurança

  • A chave age como você: guarde em variável de ambiente, nunca no código.
  • Arquivos de credenciais (.env, chaves, certificados) não passam pela API de arquivos — use rt.envs.

Documentação: https://docs.rtcloud.com.br/sdk-python · Licença MIT.

Metadata

Release files for rtcloud 1.0.0

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

Source distribution (sdist)

Source distribution for rtcloud 1.0.0
File Size Uploaded Provenance Actions
rtcloud-1.0.0.tar.gz 9.8 kB Without provenance Details for rtcloud-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 17.7 kB

Release files / rtcloud-1.0.0.tar.gz

Download URL rtcloud-1.0.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9b286907570c521ae01c4c16c9066fa0bb3a5f65fc31ee1d37665b2112e864bb
BLAKE2b-256 checksum
How to use checksums
932fad44ef36430d6f94a7f7f1cbefd90dbd56e14aecd8967d360fbe098d2717
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / rtcloud-1.0.0-py3-none-any.whl

Download URL rtcloud-1.0.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c269fc8cb696e37682c03c1b73afe12a9a671e63d63400bfcbdc7551739050a
BLAKE2b-256 checksum
How to use checksums
7ebf771c64242f0fabac897efc80efbd829c6960a3e8139ff649f7887c497b2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for rtcloud 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files 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