MCPcopy
hub / github.com/tortoise/tortoise-orm / init_orm

Function init_orm

tortoise/contrib/quart/__init__.py:88–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86
87 @app.before_serving
88 async def init_orm() -> None: # pylint: disable=W0612
89 await Tortoise.init(config=config, config_file=config_file, db_url=db_url, modules=modules)
90 logger.info("Tortoise-ORM started, %s, %s", get_connections()._get_storage(), Tortoise.apps)
91 if _generate_schemas:
92 logger.info("Tortoise-ORM generating schema")
93 await Tortoise.generate_schemas()
94
95 @app.after_serving
96 async def close_orm() -> None: # pylint: disable=W0612

Callers

nothing calls this directly

Calls 4

get_connectionsFunction · 0.90
_get_storageMethod · 0.80
initMethod · 0.45
generate_schemasMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…