Repository navigation
Releases: MartinBasualdo0/pyPPI
Releases · MartinBasualdo0/pyPPI
Release list
v0.2.3
Cambios
- fix: serialización de cookies con metadata completa (dominio, path, expires) para que el mecanismo de dispositivo confiable funcione correctamente entre sesiones
- feat: herramienta
tools/auth_explorer— bot Playwright autónomo para reverse-engineer del mecanismo de 2FA de PPI
v0.2.2
What's changed
- feat: session caching — tokens are saved to
~/.py_ppi_arg_session.jsonso login only happens when necessary - feat: cookie persistence — using
remember_device=Trueonce marks the device as trusted; subsequent logins (even full re-logins) skip 2FA entirely - fix: bumped
requeststo 2.33.0 andurllib3to 2.7.0 (8 CVEs patched) - docs: added MkDocs documentation site
Upgrading
# Run once with remember_device=True to register the device
app = PPI(user="tu@email.com", password="tu_contraseña", remember_device=True)
# All future uses — no 2FA, no emails
app = PPI(user="tu@email.com", password="tu_contraseña")v0.2.1
What's changed
- Security: bumped
requeststo 2.33.0 andurllib3to 2.7.0 to patch 8 CVEs (4 high, 4 moderate) - Docs: added MkDocs documentation site published to GitHub Pages
v0.2.0 — 2FA support
Highlights
PPI started requiring 2FA, which broke __init__ for accounts with email-based second factor. This release adds proper 2FA handling so the library can authenticate again.
What's new
- New
otp_providerparameter onPPI(...)— pass anyCallable[[], str]returning the 6-digit code (callback, IMAP poller, prompt, etc.). Falls back toinput()when not provided. - New
remember_deviceparameter (defaultFalse) forwarded to PPI'srecordarfield. - Resolves the user's
cuentaIDfrom the JWT claimPPAuth.Claims.General.Cuentaswhen/api/Cuenta/ComitentesAsignadosis not available for the account. - Cleaner error messages in
api_request— 401s now raiseApiExceptionwith the actual server response instead of being silently swallowed; 4xx/5xx no longer collapse into a genericBad HTTP API Response.
Usage
from py_ppi_arg import PPI
# Interactive (prompts in console for the code):
app = PPI(user="...", password="...")
# Programmatic with callback:
app = PPI(user="...", password="...", otp_provider=lambda: input("OTP: "))Known limitations
- Account-context endpoints
get_tickers_listand the underlying/api/Ordenes/InstrumentosOperablesmay return 401 depending on the role/permissions PPI assigns to the account, regardless of thecuentaIDvalue passed. Market-data endpoints (search_tickers,get_technical_data_bonds,get_historic_data,get_intraday_data) work correctly.
Backwards compatibility
All new parameters have defaults, so existing call sites without 2FA on the account continue to work unchanged.