MCPcopy Create free account
hub / github.com/DJWOMS/fastapi_base / __init__

Method __init__

config/database/db_helper.py:15–23  ·  view source on GitHub ↗
(self, url: str, echo: bool = False)

Source from the content-addressed store, hash-verified

13
14class DatabaseHelper:
15 def __init__(self, url: str, echo: bool = False):
16 self.engine = create_async_engine(url=url, echo=echo)
17
18 self.session_factory = async_sessionmaker(
19 bind=self.engine,
20 autoflush=False,
21 autocommit=False,
22 expire_on_commit=False
23 )
24
25 def get_scope_session(self):
26 return async_scoped_session(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected