psqlpy-python / psqlpy

Asynchronous Python PostgreSQL driver written in Rust
https://psqlpy-python.github.io/
MIT License
211 stars 3 forks source link

Add support context manager for ConnectionPool #59

Closed IvanKirpichnikov closed 1 month ago

IvanKirpichnikov commented 2 months ago

Example code

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

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

chandr-andr commented 1 month ago

Done in https://github.com/psqlpy-python/psqlpy/releases/tag/0.7.5