INNER CODE UNIT · Python

install_plugin

fastapi-practices/fba-slim · backend/cli.py:333

async def install_plugin(  # ruff:ignore[complex-structure]
    path: str | None,
    repo_url: str | None,
    frontend: bool,  # ruff:ignore[boolean-type-hint-positional-argument]
    no_sql: bool,  # ruff:ignore[boolean-type-hint-positional-argument]
    db_type: DataBaseType,
    pk_type: PrimaryKeyType,
) -> None:
    """安装插件"""
    if settings.ENVIRONMENT != 'dev':
        raise cappa.Exit('插件安装仅在开发环境可用', code=1)

    plugin_name = None
    console.note('开始安装插件...')

    try:
        if frontend:
            if repo_url is None:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…