INNER CODE UNIT · Python

_package_dir

Priivacy-ai/spec-kitty · packages/spec-kitty-services/spec_kitty_services/__init__.py:28

def _package_dir() -> Path:
    return Path(__file__).resolve().parent


def _installed_cli_version() -> str | None:
    try:
        return importlib.metadata.version(_CLI_DISTRIBUTION)
    except importlib.metadata.PackageNotFoundError:
        return None


def _host_target() -> str | None:
    """This host's service target, from the CLI's own authority (``kernel.service_hosts``)."""
    from kernel.service_hosts import host_target  # lazy: a broken CLI install must not break importing the providers

    target = host_target()
    return None if target is None else target.value

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…