Skip to main content

quantilica-core: Fundação de infraestrutura para projetos Quantilica

License: MIT Python

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

  1. Neutralidade de domínio — o core nunca sabe o que é IBGE, DATASUS ou INMET.
  2. Leveza — dependências mínimas no núcleo; integrações pesadas são extras opcionais.
  3. Estabilidade — alta cobertura de testes em todos os componentes de infraestrutura.
  4. 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.10.1

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

Source distribution (sdist)

Source distribution for quantilica-core 0.10.1
File Size Uploaded
quantilica_core-0.10.1.tar.gz 60.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for quantilica-core 0.10.1
File Interpreter ABI Platform
quantilica_core-0.10.1-py3-none-any.whl Python 3 none any Details

Total release size: 105.7 kB

Release files / quantilica_core-0.10.1.tar.gz

Download URL quantilica_core-0.10.1.tar.gz
Size 60.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ccfbe32e004ac719ad1a2a800ef5f22df15a87811f1b3a59206cf9f4346e46ed
BLAKE2b-256 checksum
How to use checksums
ce2ceb37c3c4880be221ad87bbbdce3b57e028926db62ac88b044493b4e622b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 9, 2026.

Transparency log

Release files / quantilica_core-0.10.1-py3-none-any.whl

Download URL quantilica_core-0.10.1-py3-none-any.whl
Size 44.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f6bfee14a5c5559c4d1bf5bc0fe0777ac6629accdc11891db09a1dc6f8c3deb
BLAKE2b-256 checksum
How to use checksums
757c313bb4c24062db003aa4d11efca9f9bbbc3a813f4012676cdf6dc384259e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.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 Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

0.11.0

2 release files

This release

0.10.1 This release

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

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