runtimepy.net.apps package#
Module contents#
A module aggregating commonly used network applications (that use the connection-arbiter technology).
- class runtimepy.net.apps.AppInfo(logger: Logger | LoggerAdapter[Any], stack: AsyncExitStack, connections: MutableMapping[str, Connection], conn_manager: ConnectionManager, names: Namespace, stop: Event, config: dict[str, str | int | float | bool | None | dict[str, str | int | float | bool | None] | list[str | int | float | bool | None]], ports: dict[str, int], tui: TuiMixin, tasks: dict[str, PeriodicTask], task_manager: PeriodicTaskManager[Any], results: list[list[AppResult]], structs: dict[str, RuntimeStructBase], peers: dict[str, _RuntimepyPeer])[source]#
Bases:
LoggerMixin
References provided to network applications.
- config: dict[str, str | int | float | bool | None | dict[str, str | int | float | bool | None] | list[str | int | float | bool | None]]#
- config_param(key: str, default: Z, strict: bool = False) Z [source]#
Attempt to get a configuration parameter.
- conn_manager: ConnectionManager#
- connections: MutableMapping[str, Connection]#
- logger: Logger | LoggerAdapter[Any]#
- names: Namespace#
- original_config() dict[str, Any] [source]#
Re-assemble a dictionary closer to the original configuration data (than the .config attribute).
- peers: dict[str, _RuntimepyPeer]#
- ports: dict[str, int]#
- property raised_exception: bool#
Determine if the application raised any exception.
- result(logger: Logger | LoggerAdapter[Any] = None) bool [source]#
Get the overall boolean result for the application.
- search(*names: str, pattern: str = '.*', kind: type[~runtimepy.net.arbiter.info.T] = <class 'runtimepy.net.connection.Connection'>) Iterator[T] [source]#
Get all connections that are matching a naming convention or are specific kind (or both).
- search_structs(kind: type[W], pattern: str = '.*') Iterator[W] [source]#
Search for structs by type or name.
- search_tasks(kind: type[V], pattern: str = '.*') Iterator[V] [source]#
Search for tasks by type or pattern.
- single(*names: str, pattern: str = '.*', kind: type[~runtimepy.net.arbiter.info.T] = <class 'runtimepy.net.connection.Connection'>) T [source]#
Search for a single node.
- stack: AsyncExitStack#
- stop: Event#
- structs: dict[str, RuntimeStructBase]#
- task_manager: PeriodicTaskManager[Any]#
- tasks: dict[str, PeriodicTask]#