Skip to content

Releases: MartinBasualdo0/pyPPI

v0.2.3

Choose a tag to compare

@MartinBasualdo0 MartinBasualdo0 released this 30 May 16:18

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

Choose a tag to compare

@MartinBasualdo0 MartinBasualdo0 released this 16 May 21:47

What's changed

  • feat: session caching — tokens are saved to ~/.py_ppi_arg_session.json so login only happens when necessary
  • feat: cookie persistence — using remember_device=True once marks the device as trusted; subsequent logins (even full re-logins) skip 2FA entirely
  • fix: bumped requests to 2.33.0 and urllib3 to 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

Choose a tag to compare

@MartinBasualdo0 MartinBasualdo0 released this 16 May 21:18

What's changed

  • Security: bumped requests to 2.33.0 and urllib3 to 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

Choose a tag to compare

@MartinBasualdo0 MartinBasualdo0 released this 09 May 15:23

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_provider parameter on PPI(...) — pass any Callable[[], str] returning the 6-digit code (callback, IMAP poller, prompt, etc.). Falls back to input() when not provided.
  • New remember_device parameter (default False) forwarded to PPI's recordar field.
  • Resolves the user's cuentaID from the JWT claim PPAuth.Claims.General.Cuentas when /api/Cuenta/ComitentesAsignados is not available for the account.
  • Cleaner error messages in api_request — 401s now raise ApiException with the actual server response instead of being silently swallowed; 4xx/5xx no longer collapse into a generic Bad 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_list and the underlying /api/Ordenes/InstrumentosOperables may return 401 depending on the role/permissions PPI assigns to the account, regardless of the cuentaID value 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.

v.0.0.3

Choose a tag to compare

@MartinBasualdo0 MartinBasualdo0 released this 09 Aug 14:43

Readme corrected

v.1.0.1

Choose a tag to compare

@MartinBasualdo0 MartinBasualdo0 released this 07 Aug 15:11

Corregido el readme