Repositorio central de ativos de automacao e bibliotecas compartilhadas
Project description
loot
Repositório central de ativos de automação e bibliotecas compartilhadas.
Consolida o conhecimento técnico da equipe em um único lugar, evitando retrabalho entre projetos.
Propósito
Desafios técnicos de automação (Auth, ETL, Integrações) se repetem entre projetos. Este repositório centraliza essas soluções para:
- Reduzir retrabalho reutilizando código já testado
- Padronizar implementações recorrentes
- Centralizar práticas de segurança (credenciais, retries, etc)
Estrutura
O repositório organiza soluções agnósticas ao cliente/projeto:
/auth: Módulos de autenticação (OAuth2 flows, gestão de tokens, cookies sessions)./parsers: Tratamento e normalização de dados (PDF, Excel, CSV, Strings regex)./connectors: Wrappers e clientes para APIs frequentes (Google Workspace, Slack, ERPs)./helpers: Utilitários de infraestrutura (Loggers, Decorators de retry, Tratamento de exceção)./scaffolds: Estruturas base para iniciar novos bots ou automações.
Guia de Contribuição
Contribua com qualquer código reutilizável: funções genéricas, classes utilitárias ou scripts de configuração.
Requisitos
- Sanitização: Remova credenciais e dados sensíveis. Use variáveis de ambiente (
os.getenv). - Desacoplamento: O código deve funcionar fora do contexto original.
- Documentação: Adicione docstring explicando o que faz e suas dependências.
- Type Hints: Adicione type hints em todas as funções.
Type Hints
O pacote inclui suporte completo a type hints (py.typed). Ao adicionar código:
from typing import TypedDict
# Com type hints
def validar_email(email: str) -> bool:
"""Valida formato de email."""
return "@" in email
# Retorno complexo com TypedDict
class ResultadoValidacao(TypedDict):
valido: bool
mensagem: str
def processar_dados(valor: str) -> ResultadoValidacao:
return {"valido": True, "mensagem": "OK"}
# Evitar: sem type hints
def validar_email(email):
return "@" in email
O arquivo py.typed já está configurado. Basta adicionar type hints (param: tipo e -> tipo_retorno) em funções novas. Use TypedDict para dicts de retorno complexos.
Instalação
Via PyPI
# Com UV
uv add qegloot
# Com pip
pip install qegloot
Via GitHub
uv pip install git+https://github.com/QualidadeGestaoBRMED/loot.git@v0.1.0
uv pip install git+https://github.com/QualidadeGestaoBRMED/loot.git
Instalação local
git clone https://github.com/QualidadeGestaoBRMED/loot.git
cd loot
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
Uso
from loot.parsers import process_document, is_cpf_valid
# Processar e validar CPF
result = process_document("123.456.789-09")
print(result)
# {'original_input': '123.456.789-09', 'type': 'CPF',
# 'is_valid': True, 'clean_value': '12345678909',
# 'formatted': '123.456.789-09'}
# Validação direta
if is_cpf_valid("12345678909"):
print("CPF válido!")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qegloot-0.1.2.tar.gz.
File metadata
- Download URL: qegloot-0.1.2.tar.gz
- Upload date:
- Size: 59.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
020298e4fe8bd4fcec7480644abedf2cd225d3bb22e4a0e084fe1dd1f5af4534
|
|
| MD5 |
58fc0706259c52dcfe8fb638a93d36f4
|
|
| BLAKE2b-256 |
34d3bc77d6427d9ca8b8acf8c62cba9f7d239919335aae793dae205062d2de66
|
Provenance
The following attestation bundles were made for qegloot-0.1.2.tar.gz:
Publisher:
publish.yml on QualidadeGestaoBRMED/loot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qegloot-0.1.2.tar.gz -
Subject digest:
020298e4fe8bd4fcec7480644abedf2cd225d3bb22e4a0e084fe1dd1f5af4534 - Sigstore transparency entry: 992287488
- Sigstore integration time:
-
Permalink:
QualidadeGestaoBRMED/loot@79045c0b0ebb92cc213024c069bf9888aaa41315 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/QualidadeGestaoBRMED
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79045c0b0ebb92cc213024c069bf9888aaa41315 -
Trigger Event:
release
-
Statement type:
File details
Details for the file qegloot-0.1.2-py3-none-any.whl.
File metadata
- Download URL: qegloot-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5d7ebe4b7ebfdba00982deffa2ee36f8c969881818b67415e5fb0df2e11a118
|
|
| MD5 |
87a8d1cfb87bfe4ab768ba5770e31f68
|
|
| BLAKE2b-256 |
cb64a2d1307e55b59b9c3626efec003aa5687eaf3580577d759e9d025ffb5ffe
|
Provenance
The following attestation bundles were made for qegloot-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on QualidadeGestaoBRMED/loot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qegloot-0.1.2-py3-none-any.whl -
Subject digest:
c5d7ebe4b7ebfdba00982deffa2ee36f8c969881818b67415e5fb0df2e11a118 - Sigstore transparency entry: 992287530
- Sigstore integration time:
-
Permalink:
QualidadeGestaoBRMED/loot@79045c0b0ebb92cc213024c069bf9888aaa41315 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/QualidadeGestaoBRMED
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@79045c0b0ebb92cc213024c069bf9888aaa41315 -
Trigger Event:
release
-
Statement type: