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"):