Skip to content

Commit 986b21a

Browse files
committed
fix(repository): Debugging database configuration in fastapi package
1 parent 375ebfa commit 986b21a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

monobank_api_client/fastapi_mono/database.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
load_dotenv()
1010

11-
DATABASE_URI = os.getenv("DATABASE_URI")
11+
DB_URI = os.getenv("DB_URI", "postgres:postgres@localhost:5432/postgres")
1212

13-
engine = create_async_engine(DATABASE_URI, poolclass=NullPool)
13+
ASYNC_DATABASE_URI = f"postgresql+asyncpg://{DB_URI}"
14+
15+
engine = create_async_engine(ASYNC_DATABASE_URI, poolclass=NullPool)
1416
async_session_maker = sessionmaker(engine, class_=AsyncSession, expire_on_commit=False)
1517

1618

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def readme():
88

99
setup(
1010
name="monobank_api_client",
11-
version="1.1.8",
11+
version="1.1.9",
1212
author="ihor.sotnyk",
1313
author_email="ihor.sotnyk@onix-systems.com",
1414
description="This module is designed for quick interaction with the monobank API.",

0 commit comments

Comments
 (0)