File size: 465 Bytes
21b7374 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from pathlib import Path
import typer
def get_config_folder() -> Path:
return Path(typer.get_app_dir("fastapi-cli"))
def get_auth_path() -> Path:
auth_path = get_config_folder() / "auth.json"
auth_path.parent.mkdir(parents=True, exist_ok=True)
return auth_path
def get_cli_config_path() -> Path:
cli_config_path = get_config_folder() / "cli.json"
cli_config_path.parent.mkdir(parents=True, exist_ok=True)
return cli_config_path
|