From 82b59d33cf1d9488bfb1bc36f7311abc7c5cf991 Mon Sep 17 00:00:00 2001 From: marys Date: Wed, 28 May 2025 11:27:09 +0200 Subject: [PATCH] - add som descriptions --- utils/db/db.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/db/db.py b/utils/db/db.py index 1ebd132..45c3581 100644 --- a/utils/db/db.py +++ b/utils/db/db.py @@ -4,6 +4,12 @@ from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine, async_sess from sqlalchemy.pool import NullPool class DbConnector: + """ + Must create instance of singleton and then must be initialized using method init. + Right place for init db is for example in main before uvicorn.run + + :raises SQLAlchemyError, IntegrityError, OperationalError, ... + """ _instances = {} def __new__(cls, db_id="default"):