qaspen-python / psqlpy

Asynchronous Python PostgreSQL driver written in Rust
https://qaspen-python.github.io/
MIT License
177 stars 4 forks source link

Add support context manager for ConnectionPool #59

Open IvanKirpichnikov opened 2 weeks ago

IvanKirpichnikov commented 2 weeks ago

Example code

with ConnectionPool(
    dsn=config.url.security(),
    max_db_pool_size=config.pool_size,
) as pool:
    pass
chandr-andr commented 2 weeks ago

Thanks for the feature request! We'll take in development as soon as possible.