quantilica-core: Fundação de infraestrutura para projetos Quantilica
Biblioteca de utilitários domain-neutral que serve como base para todos os coletores e pipelines Quantilica. Centraliza rede resiliente, armazenamento atômico, proveniência de dados e logging estruturado — permitindo que cada pacote de domínio foque exclusivamente na lógica de sua fonte de dados.
Para a documentação completa, consulte https://docs.quantilica.com.
Instalação
pip install quantilica-core
Com uv:
uv add quantilica-core
Uso Rápido
from quantilica.core.http import HttpClient
from quantilica.core.storage import LocalStorage
from quantilica.core.manifests import DownloadManifest
# Cliente HTTP com retry automático
client = HttpClient(attempts=3)
response = client.get("https://api.ibge.gov.br/...")
# Escrita atômica em disco
storage = LocalStorage("dados/raw")
stat = storage.write_bytes("sidra/tabela.csv", response.content)
# Registro de proveniência (SHA-256)
manifest = DownloadManifest.from_file(
source_id="ibge",
dataset_id="sidra-1234",
url="https://...",
file_path=stat.path,
producer="sidra-fetcher",
)
manifest.write_json(stat.path.with_suffix(".manifest.json"))
Módulos
| Módulo | Descrição |
|---|---|
http |
HttpClient e AsyncHttpClient com backoff exponencial e jitter |
retry |
Lógica de retry configurável para falhas de rede e erros transientes |
storage |
LocalStorage para gerenciar artefatos brutos e processados atomicamente |
manifests |
DownloadManifest e ExecutionManifest para rastreabilidade completa |
metadata |
Modelos MetadataCatalog, Source, Dataset para interoperabilidade |
logging |
Logging estruturado via get_logger e log_step |
exceptions |
Hierarquia padrão: FetchError, ParseError, StorageError |
Princípios de Design
- Neutralidade de domínio — o core nunca sabe o que é IBGE, DATASUS ou INMET.
- Leveza — dependências mínimas no núcleo; integrações pesadas são extras opcionais.
- Estabilidade — alta cobertura de testes em todos os componentes de infraestrutura.
- DX — APIs tipadas e tratamento de erros consistente em toda a organização.
Desenvolvimento
git clone https://github.com/Quantilica/quantilica-core.git
cd quantilica-core
uv sync --dev
uv run pytest
Licença
MIT — veja LICENSE.
Metadata
Release files for quantilica-core 0.14.1
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 |
|---|---|---|---|---|
| quantilica_core-0.14.1.tar.gz | 74.6 kB | With provenance | Details for quantilica_core-0.14.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quantilica_core-0.14.1-py3-none-any.whl | Python 3 | none | any | Details for quantilica_core-0.14.1-py3-none-any.whl |
Total release size: 125.6 kB
Release files / quantilica_core-0.14.1.tar.gz
| Download URL | quantilica_core-0.14.1.tar.gz |
|---|---|
| Size | 74.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3af133818003870f22dce305caa129c8b8827d1e2223f97e9487790a57739f0
|
|
BLAKE2b-256 checksum How to use checksums |
b9e00d59e4ffdbdd421468d3895577e335e991e6b07ed2748a6952aba03d53ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 30, 2026.
Transparency logRelease files / quantilica_core-0.14.1-py3-none-any.whl
| Download URL | quantilica_core-0.14.1-py3-none-any.whl |
|---|---|
| Size | 51.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
078b11178d69034a2dc134da1c20cb27ed13190cb8bfc9907c6cc0c4e61d2b82
|
|
BLAKE2b-256 checksum How to use checksums |
8cf0e6bb1faec2c04be65aea2af4d53c5f7dabca4be9db4b6d967751e381c240
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 30, 2026.
Transparency logSecurity for quantilica-core 0.14.1
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 quantilica_core-0.14.1.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 Oct 30, 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.