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

Function init

tortoise/cli/cli.py:367–374  ·  view source on GitHub ↗
(ctx: CLIContext, app_labels: tuple[str, ...])

Source from the content-addressed store, hash-verified

365
366
367async def init(ctx: CLIContext, app_labels: tuple[str, ...]) -> None:
368 config = _load_config(ctx)
369 apps_config = _select_apps(config, app_labels or None)
370 for label, app_config in apps_config.items():
371 # Convert AppConfig to dict for _ensure_migrations_package
372 app_dict = app_config.to_dict()
373 module, path = _ensure_migrations_package(label, app_dict)
374 print(f"{label}: {module} -> {path}")
375
376
377async def shell(ctx: CLIContext) -> None:

Callers 1

_run_initFunction · 0.85

Calls 5

_load_configFunction · 0.85
_select_appsFunction · 0.85
itemsMethod · 0.80
to_dictMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…