Skip to content

FastAgency

fastagency.FastAgency #

FastAgency(wf: Workflows, ui: UI)

Initialize the FastAgency object.

PARAMETER DESCRIPTION
wf

The workflows object to use

TYPE: Workflows

ui

The UI object to use

TYPE: UI

Source code in fastagency/app.py
def __init__(self, wf: Workflows, ui: UI) -> None:
    """Initialize the FastAgency object.

    Args:
        wf (Workflows): The workflows object to use
        ui (UI): The UI object to use
    """
    self._wf = wf
    self._ui = ui

ui property #

ui: UI

Return the UI object.

wf property #

Return the workflows object.

create #

create(import_string: str) -> Generator[None, None, None]

Create the FastAgency.

Source code in fastagency/app.py
@contextmanager
def create(self, import_string: str) -> Generator[None, None, None]:
    """Create the FastAgency."""
    with self._ui.create(app=self, import_string=import_string):
        yield

start #

start(
    import_string: str,
    name: Optional[str] = None,
    initial_message: Optional[str] = None,
) -> None

Start the FastAgency.

Source code in fastagency/app.py
def start(
    self,
    import_string: str,
    name: Optional[str] = None,
    initial_message: Optional[str] = None,
) -> None:
    """Start the FastAgency."""
    self.ui.start(
        app=self,
        import_string=import_string,
        name=name,
        initial_message=initial_message,
    )