Skip to main content

Reactor Runtime

A Python framework for building real-time, interactive video models. Write your ML code — Reactor handles networking, media transport, and client connections.

Installation

pip install reactor-runtime

Quick Example

from dataclasses import dataclass
from reactor_runtime.interface import Output, Video, ReactorPipeline, InputState, InputField

@dataclass
class MyOutput(Output):
    video: Video

@dataclass
class MyState(InputState):
    prompt: str = InputField(default="a sunny meadow")

class MyModel(ReactorPipeline):
    state: MyState

    def load(self, config):
        self.pipe = load_my_model(config["checkpoint"])

    def inference(self):
        while True:
            frame = self.pipe.forward(prompt=self.state.prompt)
            yield MyOutput(video=frame)

Implement inference() as a generator that yields frames. Clients can update self.state mid-generation — no restart, no re-queue.

Key Features

  • Real-time streaming — frames delivered over WebRTC as they're generated
  • Live interaction — clients change inputs mid-generation via typed, validated state
  • No transport code — no WebRTC, WebSocket, or video encoding to manage
  • Scaffold & run — the Go reactor CLI gives you reactor init / reactor run; the Python runtime ships its own reactor-runtime script for standalone use

Standalone usage (no Go CLI)

The runtime CLI is installed as reactor-runtime so it never shadows the Go reactor binary. If you only use the Python runtime:

pip install reactor-runtime
reactor-runtime init my-model
cd my-model
python -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
reactor-runtime run

The Go reactor CLI delegates to this same reactor-runtime script under the hood; both reactor run (Go) and reactor-runtime run (standalone) execute the same Python entry point.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reactor_runtime-2.9.2.tar.gz (248.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reactor_runtime-2.9.2-py3-none-any.whl (311.3 kB view details)

Uploaded Python 3

File details

Details for the file reactor_runtime-2.9.2.tar.gz.

File metadata

  • Download URL: reactor_runtime-2.9.2.tar.gz
  • Upload date:
  • Size: 248.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for reactor_runtime-2.9.2.tar.gz
Algorithm Hash digest
SHA256 a3a2aae5b7f049b8f44087ba335e8840ddda0f1e6ab0b02e70eae8e0e6e5da90
MD5 0a4033d7946747dac858017502e80dba
BLAKE2b-256 9bc6e9b8779212b7540e6f6681a886d7946b649fa7222d9b898b6a6bbbb44cbb

See more details on using hashes here.

File details

Details for the file reactor_runtime-2.9.2-py3-none-any.whl.

File metadata

File hashes

Hashes for reactor_runtime-2.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c277b0a34605ddf6b37b634b33567d739c5affe7bf0d9a6b888c487ab70ea1d0
MD5 3139e436c709ea28e81942eca402008d
BLAKE2b-256 1defe30c61cb1a739142a38896124b283485c4fa6f6b5b1e07149ce14abc039f

See more details on using hashes here.

Release history Release notifications | RSS feed

3.2.5

2 files

3.2.4

2 files

3.2.3

2 files

3.2.2

2 files

3.2.1

2 files

3.2.0

2 files

3.1.2

2 files

3.1.1

2 files

3.1.0

2 files

3.0.2

2 files

3.0.1

2 files

2.10.1

2 files

2.10.0

2 files

2.9.4

2 files

2.9.3

2 files

This release

2.9.2 This release

2 files

2.9.1

2 files

2.9.0

2 files

2.8.1

2 files

2.8.0

2 files

2.7.10

2 files

2.7.9

2 files

2.7.8

2 files

2.7.7

2 files

2.7.6

2 files

2.7.5

2 files

2.7.4

2 files

2.7.3

2 files

2.7.2

2 files

2.7.1

2 files

2.7.0

2 files

2.6.0

2 files

2.5.0

2 files

2.4.0

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

2.2.1

2 files

2.2.0

2 files

2.1.0

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.7.5

2 files

1.7.4

2 files

1.6.3

2 files

1.6.1

2 files

1.4.3

2 files

1.2.1

2 files

1.1.0

2 files

1.0.0

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

0.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page