runtimepy.sample package#

Submodules#

runtimepy.sample.peer module#

A sample peer program interface.

class runtimepy.sample.peer.SamplePeer(protocol: RuntimepySubprocessProtocol, name: str, config: dict[str, str | int | float | bool | None | dict[str, str | int | float | bool | None] | list[str | int | float | bool | None]], markdown: str = None)[source]#

Bases: RuntimepyPeer

A sample peer program.

async main() None[source]#

Program entry.

runtimepy.sample.program module#

A module implementing a sample peer-program interface.

class runtimepy.sample.program.SampleProgram(name: str, config: dict[str, str | int | float | bool | None | dict[str, str | int | float | bool | None] | list[str | int | float | bool | None]], markdown: str = None)[source]#

Bases: PeerProgram

A sample peer program.

async cleanup() None[source]#

Runs when program ‘running’ context exits.

async log_message_sender(poll_period_s: float, did_write: Event) None[source]#

Write to stderr periodically.

pre_environment_exchange() None[source]#

Perform early initialization tasks.

stderr_task: Task[None]#
struct_pre_finalize() None[source]#

Configure struct before finalization.

struct_type#

alias of SampleStruct

async runtimepy.sample.program.run(app: AppInfo) int[source]#

A network application that doesn’t do anything.

Module contents#

A module aggregating sample runtime interfaces.