Skip to main content

rutis

Write rutis plugins in Python, and the runtime that runs them.

from rutis import define_plugin


class Weather:
    def __init__(self, llm, city):
        self.llm, self.city = llm, city

    async def today(self):
        return f"{await self.llm.ask(self.city)} in {self.city}"


def apply(ctx, config):
    ctx.provide("weather", Weather(ctx.use("llm"), config["city"]))


plugin = define_plugin(apply, inject=["llm"])

What ctx.provide provides reaches rutis by itself, its methods the object's public callables, called as async. provides is optional: provides={"weather": Weather} (or {"weather": {"unit": "sync"}}) marks methods sync and tells rutis-host check what the plugin provides before it runs.

Test it without a host:

from rutis.testing import load

async with load(plugin, config={"city": "Oslo"}, services={"llm": FakeLlm()}) as t:
    assert await t.service("weather").today() == "sunny in Oslo"

A host runs plugins with python -m rutis <channel> <project> (it starts that itself); python -m rutis listen:wss://… --id <id> --peer <controller> <project> runs a runtime a host on another machine controls (install rutis[network]; not on CPython 3.13.6, whose TLS sockets deadlock, python/cpython#137583: use 3.13.7 or later); python -m rutis dial:wss://… --id <id> --peer <controller> <project> connects to that host instead and reconnects by itself (token in RUTIS_TOKEN, a further CA in RUTIS_CA). Packaged plugins register under the entry point group rutis.plugins. Python 3.10 or later; no dependencies.

Start a project with uvx rutis-host new <name> --lang python. Guide (Chinese): docs/guide/python-plugin.md.

Metadata

Release files for rutis 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rutis 0.12.0
File Size Uploaded
rutis-0.12.0.tar.gz 85.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rutis 0.12.0
File Interpreter ABI Platform
rutis-0.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 141.0 kB

Release files / rutis-0.12.0.tar.gz

Download URL rutis-0.12.0.tar.gz
Size 85.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e9065bec93f9255cdd530780b718531f56cc19b3da60290ad36fb8c3a88fbcda
BLAKE2b-256 checksum
How to use checksums
fc8c149ba53f2e4573d02e47f4491bc0dcb1fec0328e4d06bf6c2981aab348fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / rutis-0.12.0-py3-none-any.whl

Download URL rutis-0.12.0-py3-none-any.whl
Size 55.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0d5e2099956dd7625e9239d52e2621d7f0c7126d716ef61b0c4e2a205ebf091
BLAKE2b-256 checksum
How to use checksums
9cb5ca0dc59eb2faca25e47692caeafda1dc3bd356c3bd42798ec80ec303c3a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.12.1

2 release files

This release

0.12.0 This release

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release 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