Skip to main content

Reactor runtime with public model API

Project description

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 & runreactor init creates a project; reactor run starts it locally

Project details


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.3.2.tar.gz (198.8 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.3.2-py3-none-any.whl (259.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reactor_runtime-2.3.2.tar.gz
  • Upload date:
  • Size: 198.8 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.3.2.tar.gz
Algorithm Hash digest
SHA256 6f5930e6a88bfa624de34be9603e4b8c8816886bee2445c463d2d70833b040c2
MD5 c00b2d81ab9412e13b0934577bb787a8
BLAKE2b-256 fb0013c31014692e974f488708b0d1e0b75404e84c1b47464c66ffadcbd1c3d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reactor_runtime-2.3.2-py3-none-any.whl
  • Upload date:
  • Size: 259.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for reactor_runtime-2.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 28bcce387c38807707c8102d157aa1e309623a4d0fbf1d0e4daf99b699a2a062
MD5 a050d2cc6818e8dc5d33c00fe1451b2e
BLAKE2b-256 824e820d75d24d22d8b2a09e0d54605ea6142ef4cd48f41238177c626d72ca35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page