lummios
Cliente Python para a Lummios Developer — API de dados fundamentalistas da B3/CVM: fundamentos linha a linha desde 2010, cotações ajustadas por eventos societários, indicadores, dividendos, dados prudenciais de bancos (Basileia/CET1 via Banco Central) e análises de IA com explicabilidade.
Instalação
pip install lummios
Se o pacote ainda não estiver publicado no PyPI, instale direto do GitHub:
pip install git+https://github.com/brownbr84/lummios-python.git
Chave de API
Gere uma chave gratuita (1.000 requisições/dia) em developers.lummios.com.br — leva 30 segundos, sem cartão de crédito.
Uso rápido
from lummios import LummiosClient
client = LummiosClient(api_key="sua_chave")
# ou, definindo a variável de ambiente LUMMIOS_API_KEY:
# client = LummiosClient()
fund = client.fundamentals("PETR4")
print(fund["p_l"], fund["roe"], fund["dividend_yield"])
Screener fundamentalista
resultado = client.screener(roe_min=15, div_liq_ebitda_max=3, setor="Petróleo, Gás e Biocombustíveis")
for ativo in resultado:
print(ativo["ticker_ref"], ativo["pl_ratio"], ativo["dividend_yield"])
Histórico ajustado (split + total return) para backtest
historico = client.historico_ajustado("WEGE3")
for ponto in historico:
print(ponto["date"], ponto["adj_close_tr"]) # ajustado por splits + proventos
Índice de Basileia de um banco
banco = client.bank_indicators("ITUB4")
print(banco["basileia_valor"], banco["indice_eficiencia"], banco["roaa"])
Checks factuais (estilo "fato + fonte", CVM-safe)
checks = client.checks("VALE3")
for nome, resumo in checks["dimensoes"].items():
print(nome, f"{resumo['atende']}/{resumo['total']} atende")
for c in checks["checks"]:
print(c["dimensao"], "-", c["pergunta"], "->", c["atende"], f"(valor={c['valor']}, referência={c['referencia']})")
Qualquer endpoint da API (escape hatch)
O cliente cobre os métodos de uso mais comum, mas a API tem 50+ rotas
(referência completa). Para qualquer
endpoint sem atalho dedicado, use .get() diretamente:
client.get("/v1/tickers/PETR4/governance")
client.get("/v1/tickers/PETR4/esg")
client.get("/v1/mercado/breadth")
Tratamento de erros
from lummios import LummiosAuthError, LummiosQuotaError, LummiosAPIError
try:
client.fundamentals("PETR4")
except LummiosAuthError:
print("chave inválida ou ausente")
except LummiosQuotaError as e:
print(f"cota diária ({e.daily_quota}) atingida — faça upgrade do plano")
except LummiosAPIError as e:
print(f"erro da API: {e.status_code}")
Cobertura de métodos
| Método | Endpoint |
|---|---|
ticker(t) |
/v1/tickers/{t} |
fundamentals(t) |
/v1/tickers/{t}/fundamentals |
historico(t, **params) |
/v1/tickers/{t}/historico |
historico_ajustado(t, **params) |
/v1/tickers/{t}/historico-ajustado |
multiplos_historico(t, **params) |
/v1/tickers/{t}/multiplos-historico |
dividends(t) |
/v1/tickers/{t}/dividends |
corporate_actions(t) |
/v1/tickers/{t}/corporate-actions |
dfp_completo(t, **params) |
/v1/tickers/{t}/dfp-completo |
checks(t) |
/v1/tickers/{t}/checks |
bank_indicators(t) |
/v1/tickers/{t}/bank-indicators |
peers(t) |
/v1/tickers/{t}/peers |
ai_explicabilidade(t) |
/v1/tickers/{t}/ai-explicabilidade |
valor_intrinseco(t) |
/v1/tickers/{t}/valor-intrinseco |
info(t) |
/v1/tickers/{t}/info |
mercado_resumo() |
/v1/mercado/resumo |
maiores_altas() / maiores_baixas() / maior_volume() |
/v1/mercado/... |
screener(**params) |
/v1/screener |
classificacao() |
/v1/classificacao |
comparar(tickers, **params) |
/v1/comparar |
macro() |
/v1/macro |
dataset_info() |
/v1/info |
get(path, **params) |
qualquer rota (referência completa nos docs) |
Sobre os dados
- Fundamentos CVM: DFP/ITR linha a linha, FY2010 → presente.
- Cotações B3: histórico completo, ajustadas por splits/proventos, point-in-time.
- Dados bancários: Basileia/CET1/Tier1 de instituições financeiras (BCB IFData).
- Conformidade: scores e narrativas de IA são leituras estatísticas descritivas de dados públicos — nunca recomendação de investimento (Res. CVM 20/2021).
Detalhes completos de cobertura e metodologia: Data Sheet.
Desenvolvimento
git clone https://github.com/brownbr84/lummios-python.git
cd lummios-python
pip install -e ".[dev]"
pytest
Licença
MIT — veja LICENSE.
Metadata
Release files for lummios 0.1.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 |
|---|---|---|---|---|
| lummios-0.1.0.tar.gz | 7.7 kB | With provenance | Details for lummios-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lummios-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for lummios-0.1.0-py3-none-any.whl |
Total release size: 15.5 kB
Release files / lummios-0.1.0.tar.gz
| Download URL | lummios-0.1.0.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13513914b112038a0558818431b9650cc949631a0e11187d9702670cbe3f03f9
|
|
BLAKE2b-256 checksum How to use checksums |
51c29bbe8788721134b76e4eba9f84b27c8f7ddc52e7776dbedad24cb8b4fd98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logRelease files / lummios-0.1.0-py3-none-any.whl
| Download URL | lummios-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4418193f5566948940fff4519e69aa6b6fbe75360beb261bf1828a5987c72eb7
|
|
BLAKE2b-256 checksum How to use checksums |
1b57248aac5bfbbd7fe5e2e575deb223110450c99aa17bb636e11404c7f4cb6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logSecurity for lummios 0.1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lummios-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logA 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.