Update postgres_impl.py

This commit is contained in:
Saifeddine ALOUI
2025-02-19 19:50:46 +01:00
committed by GitHub
parent 9ec46b8c5c
commit 521dbf2be1

View File

@@ -38,16 +38,9 @@ import pipmaster as pm
if not pm.is_installed("asyncpg"):
pm.install("asyncpg")
try:
import asyncpg
from asyncpg import Pool
except ImportError as e:
raise ImportError(
"`asyncpg` library is not installed. Please install it via pip: `pip install asyncpg`."
) from e
class PostgreSQLDB:
def __init__(self, config: dict[str, Any], **kwargs: Any):
self.host = config.get("host", "localhost")