Metastatic.Supplemental.Python.Pykka (Metastatic v0.10.4)

View Source

Pykka actor library supplemental for Python.

Provides actor model support for Python via the Pykka library, enabling transformation of actor-related MetaAST constructs to Pykka API calls.

Supported Constructs

  • :actor_call - Synchronous actor message (ask)
  • :actor_cast - Asynchronous actor message (tell)
  • :spawn_actor - Create actor instance

Requirements

  • pykka >= 3.0

Example Transformations

# Elixir/Erlang
GenServer.call(actor, :get_state, 5000)

# MetaAST
{:actor_call, actor, :get_state, 5000}

# Python (via Pykka)
actor_ref.ask({'type': 'get_state'}, timeout=5.0)