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

Function tortoise_cli_context

tortoise/cli/cli.py:152–157  ·  view source on GitHub ↗
(
    config: dict[str, Any] | TortoiseConfig,
)

Source from the content-addressed store, hash-verified

150
151@contextlib.asynccontextmanager
152async def tortoise_cli_context(
153 config: dict[str, Any] | TortoiseConfig,
154) -> AsyncGenerator[TortoiseContext, None]:
155 async with TortoiseContext() as ctx:
156 await ctx.init(config=config)
157 yield ctx
158
159
160class _NoopRecorder(MigrationRecorder):

Callers 4

shellFunction · 0.85
makemigrationsFunction · 0.85
_run_migrateFunction · 0.85
historyFunction · 0.85

Calls 2

TortoiseContextClass · 0.90
initMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…