⚡ NEXUS HOSTINGER — Python SDK
SDK Oficial em Python para automação, monitoramento e gerenciamento de aplicações na plataforma NEXUS HOSTINGER.
📦 Instalação
pip install nexus-hostinger
🚀 Como Usar
1. Inicializando o Cliente
Gere sua Chave de API no painel em Desenvolvedor > Chaves de API:
from nexus_hosting import NexusClient
nexus = NexusClient(api_key="nexus_live_sua_chave_aqui")
2. Exemplos Práticos
📊 Consultar Recursos do Workspace
resources = nexus.account.get_resources()
print(resources["data"]["resources"])
🤖 Gerenciar Bots
# Listar todos os bots
bots = nexus.bots.list()
for bot in bots:
print(f"[{bot['status']}] {bot['name']} (ID: {bot['id']})")
# Iniciar, desligar ou reiniciar
nexus.bots.restart("id-do-bot")
# Inspecionar estatísticas em tempo real
stats = nexus.bots.stats("id-do-bot")
print(f"Uso de RAM: {stats.get('memoryUsageMb', 0)}MB")
# Consultar logs do console
logs = nexus.bots.logs("id-do-bot", lines=50)
for line in logs:
print(line)
⚡ Execução de Comandos Shell no Contêiner
res = nexus.bots.exec("id-do-bot", "pip list")
print(res["output"])
📁 Manipulação de Arquivos (REST Files API)
# Listar arquivos
files = nexus.bots.files.list("id-do-bot")
# Ler arquivo
config = nexus.bots.files.read("id-do-bot", "config.json")
print(config["content"])
# Salvar ou atualizar arquivo
nexus.bots.files.save("id-do-bot", "config.json", '{"prefix": "!"}')
🛡️ Tratamento de Erros
from nexus_hosting import NexusClient, NexusAuthError, NexusRateLimitError, NexusApiError
try:
nexus = NexusClient(api_key="chave_invalida")
bots = nexus.bots.list()
except NexusAuthError:
print("Chave de API inválida ou expirada!")
except NexusRateLimitError:
print("Limite de requisições por minuto atingido. Aguarde alguns instantes.")
except NexusApiError as e:
print(f"Erro na API NEXUS: {e}")
🌐 Links Oficiais
- Painel: https://nexushost.cloud
- Documentação: https://nexushost.cloud/docs
- Comunidade Discord: https://discord.gg/9F99uS7UWe
Metadata
Release files for nexus-hostinger 1.0.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 | |
|---|---|---|---|---|
| nexus_hostinger-1.0.0.tar.gz | 5.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nexus_hostinger-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / nexus_hostinger-1.0.0.tar.gz
| Download URL | nexus_hostinger-1.0.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
248c1f08018bea33900da894934e59ee1f4dd9f2671013e3755b62e1a1b844ae
|
|
BLAKE2b-256 checksum How to use checksums |
c8cd1a9eec6a6f55318ea769cb39c135a6a3952865060be579ad204a1049ca77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / nexus_hostinger-1.0.0-py3-none-any.whl
| Download URL | nexus_hostinger-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
704fae5b7fdce5d9a607dafa2e917cdd2eee670e5764609e15fed4a91362e4de
|
|
BLAKE2b-256 checksum How to use checksums |
7269ebb56980ef02272a4dfff86637cd661d444d8c76c603f966c3f06c158164
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for nexus-hostinger 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.