Shared Python libraries for leartech services.
Publish/subscribe domain events over a pluggable transport (Redis today; Maestro behind the
same interface later). The wire Envelope is byte-identical to leartech-bus-common (Go) —
verified cross-language — so Python and Go services interoperate on the same bus.
from leartech_common.bus import Bus, Context, RedisTransport
bus = Bus(RedisTransport("redis://redis:6379/0"), source="orchestrator")
bus.publish(Context(), "initiative.fired", {"run_id": "…"}, topic="leartech.events")
bus.subscribe("leartech.events", lambda ctx, env: print(env.type, env.payload))tenant_id defaults to "system"; the auth work fills it from the caller's token later
without changing any call site. Contract: ~/leartech/Hub/status/event-bus-contract.md.