Skip to main content

Personallize

Uma biblioteca Python com ferramentas essenciais para desenvolvimento de RPA (Robotic Process Automation) e ML (Machine Learning), oferecendo recursos para conexão com bancos de dados, logging e utilitários.

✨ Funcionalidades

  • 🔌 Dialetic: Conexões SQLAlchemy para SQLite, MySQL, PostgreSQL e SQL Server
  • 📊 Logging: Sistema de logging simples e avançado
  • 🌐 BrowserService (extra opcional): Captura de cookies/token via Playwright e montagem de requests.Session

📋 Requisitos

  • Python >= 3.11

📦 Instalação

Com uv (recomendado)

uv add personallize

Com pip

pip install personallize

Para desenvolvimento

uv pip install -e ".[dev]"

🚀 Uso

🔌 Conexão com Banco de Dados

from sqlalchemy import text

from personallize.dialetic.sqlite import SqliteConnection

# SQLite (arquivo; se não passar path, cria por padrão em ./data/<nome_da_pasta>.db)
with SqliteConnection("data/app.db") as db:
    db.session.execute(text("SELECT 1"))

# Acessar engine diretamente
engine = SqliteConnection("data/app.db").get_engine()

📊 Sistema de Logging

from personallize.loggers import ConsoleFormats, FileFormats, LogManager, RetentionOptions

manager = LogManager()

manager.config.console({
    "icon_status": "active",
    "show_debug": True,
    "format": ConsoleFormats.MEDIUM,
    "enqueue": True,
})

manager.config.file({
    "log_file": "logs/my_app",
    "format": FileFormats.FULL,
    "retention": RetentionOptions.ONE_WEEK,
    "rotation": "00:00",
    "enqueue": True,
})

log = manager.get_logger()
log.info("Aplicação iniciada")
log.error("Erro encontrado")

🌐 BrowserService (extra opcional)

Instale com o extra browser:

uv add "personallize[browser]"
from personallize.browser_service import BrowserService

with BrowserService(base_url="https://seu-sistema.com", headless=True) as bs:
    bs.goto("https://seu-sistema.com/login")
    snap = bs.snapshot_auth()
    session = bs.build_requests_session(cookie_domain_filter="seu-sistema.com")

🔧 Desenvolvimento

Executando testes

uv run pytest

Linting

uv run ruff check .

📦 Publicação (PyPI) com uv

uv build
uv publish dist/*

📄 Licença

Este projeto está licenciado sob a Licença MIT - veja o arquivo LICENSE para detalhes.

👨‍💻 Autor

Miguel Tenório

🤝 Contribuindo

Contribuições são bem-vindas! Por favor, sinta-se à vontade para submeter um Pull Request.

Metadata

Release files for personallize 1.3.2

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

Source distribution (sdist)

Source distribution for personallize 1.3.2
File Size Uploaded Provenance Actions
personallize-1.3.2.tar.gz 24.4 kB Without provenance Details for personallize-1.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for personallize 1.3.2
File Interpreter ABI Platform Actions
personallize-1.3.2-py3-none-any.whl Python 3 none any Details for personallize-1.3.2-py3-none-any.whl

Total release size: 53.5 kB

Release files / personallize-1.3.2.tar.gz

Download URL personallize-1.3.2.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b8f93e552d6cb74f80929debf16631a1bc45d3075140ba6cbf7c33659c4d4f3c
BLAKE2b-256 checksum
How to use checksums
b9dbcf18c7a2546d7e637909835fdff97ea3516d7a5e5edc52bb94859e1632a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.23

Release files / personallize-1.3.2-py3-none-any.whl

Download URL personallize-1.3.2-py3-none-any.whl
Size 29.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fda20a96e421cccc4a9b9813a0d8fccdff0048b6d4f9e9a0af226ef411d0d9c8
BLAKE2b-256 checksum
How to use checksums
06d5eb803f9aebe1feb81f5ca41fd3f2cec9240807dedc5a9181c3f47cceda0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.23

Security for personallize 1.3.2

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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