Skip to content

project

project

Project entities, lifecycle, panic, SSH provisioning — public API surface.

Re-export catalog for everything project-shaped. Sources: terok.lib.core.projects for the pure ProjectConfig value type and discovery helpers; terok.lib.domain.project for the rich Project aggregate and lifecycle; terok.lib.domain.project_state for infrastructure-state queries; terok.lib.domain.image_cleanup for image listing & cleanup; terok.lib.domain.panic for cross-project lockdown; terok.lib.domain.ssh for the SSH provisioning workflow; and terok.lib.domain.wizards.new_project for the new-project wizard primitives that CLI prompts and TUI screens share.

__all__ = [] module-attribute

__getattr__(name)

Resolve a re-exported name to its source module on first access (PEP 562).

Source code in src/terok/lib/api/project.py
def __getattr__(name: str) -> object:
    """Resolve a re-exported name to its source module on first access (PEP 562)."""
    try:
        target = _LAZY[name]
    except KeyError:
        raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None
    module_path, _, source_name = target.partition(":")
    value = getattr(importlib.import_module(module_path), source_name or name)
    globals()[name] = value  # cache so subsequent lookups skip __getattr__
    return value

__dir__()

Expose the lazy names to dir() / autocompletion.

Source code in src/terok/lib/api/project.py
def __dir__() -> list[str]:
    """Expose the lazy names to ``dir()`` / autocompletion."""
    return sorted({*globals(), *_LAZY})