MCPcopy
hub / github.com/learnhouse/learnhouse / install

Function install

apps/api/cli.py:46–55  ·  view source on GitHub ↗

Install LearnHouse: schema, default elements, organization, and admin user. Typer entry point — uses asyncio.run because no loop is running yet. Programmatic async callers (FastAPI lifespan, etc.) should await `_install_async` directly to keep the SQLAlchemy greenlet context.

(
    short: Annotated[bool, typer.Option(help="Install with predefined values")] = False
)

Source from the content-addressed store, hash-verified

44
45@cli.command()
46def install(
47 short: Annotated[bool, typer.Option(help="Install with predefined values")] = False
48):
49 """Install LearnHouse: schema, default elements, organization, and admin user.
50
51 Typer entry point — uses asyncio.run because no loop is running yet.
52 Programmatic async callers (FastAPI lifespan, etc.) should await
53 `_install_async` directly to keep the SQLAlchemy greenlet context.
54 """
55 asyncio.run(_install_async(short))
56
57
58async def _install_async(short: bool) -> None:

Callers

nothing calls this directly

Calls 1

_install_asyncFunction · 0.85

Tested by

no test coverage detected