INNER CODE UNIT · Python
alchemy_group
litestar-org/advanced-alchemy · advanced_alchemy/cli.py:39
def alchemy_group(ctx: "click.Context", config: str) -> None:
"""Advanced Alchemy CLI commands."""
from pathlib import Path
from rich import get_console
from advanced_alchemy.utils import module_loader
console = get_console()
ctx.ensure_object(dict)
# Add current working directory to sys.path to allow loading local config modules
cwd = str(Path.cwd())
if cwd not in sys.path:
sys.path.insert(0, cwd)
try:
config_instance = module_loader.import_string(config)