Skip to content

Conversation

@DolevGabay
Copy link

@DolevGabay DolevGabay commented Nov 11, 2025

Summary

Implements the feature requested in #139 — adds a password_creator
parameter to Connection to support dynamic or expiring credentials such as
AWS RDS IAM auth tokens.

Changes

  • Connection.__init__ now accepts optional password_creator
  • connect() calls it before each new connection
  • Supports both sync and async callables
  • Fully backward-compatible with existing password parameter

Tests

  • Updated conftest.py to use password_creator in test fixtures
  • All existing tests now run with dynamic password retrieval via password_creator and a static password
  • Verified both synchronous and asynchronous password creator functions work correctly

All existing tests pass on MySQL 8.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants