Skip to main content

Relay Backend

An offline API testing interface for your FastAPI application. Install one Python package, mount it once, and open /relay on your backend's existing port.

Install

Install Relay, mount it on FastAPI, then open /relay on the backend's existing port.

  1. Install in your backend's Python environment:
python -m pip install relay-backend

A fresh installation gets the latest stable release. To update an existing installation:

python -m pip install --upgrade relay-backend

Restart the backend after upgrading. The browser title uses your application's name: FastAPI(title="Ludo Portal") becomes Relay - Ludo Portal. Any application's title works.

  1. Add these lines where your FastAPI app is created:
from relay_backend import install_relay
install_relay(app)
  1. Restart the backend with its usual command and open /relay on its existing port.
Complete example for a new app
from fastapi import FastAPI
from relay_backend import install_relay

app = FastAPI()
install_relay(app)

@app.get("/health", tags=["System"])
def health():
    return {"status": "ok"}

Run your backend normally, for example uvicorn main:app --reload, then visit http://localhost:8000/relay/.

No repository clone, Node installation, frontend build, CDN, separate Relay process, or target URL is required. Existing applications only need the import and install_relay(app) call. Use install_relay(app, enabled=settings.DEBUG) to keep Relay under your application's development flag. Install it on the FastAPI object before wrapping that object in Socket.IO or another ASGI wrapper.

Included

  • Code-generated OpenAPI endpoints grouped by tags, with inline request/response testing.
  • Shared and per-endpoint bearer, Basic, API-key and explicit no-auth modes.
  • Five color schemes, copy controls, response focus, and Relay/JSON endpoint exports.
  • Manual endpoint status, defaulting to Done, with optional Git-shared status and inferred source attribution.
  • A bundled standalone CLI for local OpenAPI backends and portable .relay reports.

Python 3.11+ is required. This is a local development tool: only loopback hosts/clients are accepted. Request execution invokes your real application middleware, dependencies and handlers. Tests can change your development data. Multipart upload, OAuth browser flows, remote/shared deployment are outside v0.0.4. Opt into automatic team statuses with install_relay(app, sync_status=True) using the backend repository's existing Git remote. Team setup explains access and conflict handling.

Setup and handoff tools in 0.0.4

Run python -m relay_backend init --project ./backend to preview a supported FastAPI integration. Add --apply to write an unambiguous edit; factories and multiple apps receive manual guidance. python -m relay_backend doctor --target http://127.0.0.1:8000 --json checks the local runtime, OpenAPI and native mount with sanitized output. See setup documentation.

Endpoints include local Notes & activity, retained unsaved edits and explicit contract-change explanations. Named request examples load only when applied. Git shares statuses, not notes, credentials or request traffic.

The PyPI distribution is relay-backend; the Python import is relay_backend. The former relay_agent root import remains compatible. relay-agent on PyPI is an unrelated package.

Documentation · Source · Issues

Licensed under Apache-2.0. Bundled React, Lucide and JetBrains Mono assets retain their respective licenses; see THIRD_PARTY_NOTICES.md.

Metadata

Release files for relay-backend 0.0.4

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

Source distribution (sdist)

Source distribution for relay-backend 0.0.4
File Size Uploaded
relay_backend-0.0.4.tar.gz 275.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for relay-backend 0.0.4
File Interpreter ABI Platform
relay_backend-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 546.6 kB

Release files / relay_backend-0.0.4.tar.gz

Download URL relay_backend-0.0.4.tar.gz
Size 275.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2e4bd2998a5dee2a5737169e6d4b4917793aadbcba38e4ae7682822937ef8938
BLAKE2b-256 checksum
How to use checksums
919756758f3caf2bed7e6d38a53821d7665943b0b2fa9e5c4b1504f4f17022cf
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 12, 2026.

Transparency log

Release files / relay_backend-0.0.4-py3-none-any.whl

Download URL relay_backend-0.0.4-py3-none-any.whl
Size 271.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c16e2f0a3a3554885d25909beb9fe0a2985f24fa6c25aef46cff3ad742d6871
BLAKE2b-256 checksum
How to use checksums
b29c2caa7fec0ee7e5440f75ab2c544997cf02f4ee6fe300a1ac7f763a770290
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 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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