Skip to main content

Tabella

Open-RPC development framework with builtin interactive documentation.

Demo

Live Demo

A live demo is available here.

Install

Tabella is on PyPI and can be installed with:

pip install tabella

Or with Poetry

poetry add tabella

Python OpenRPC Docs

The RPC server hosted and documented by Tabella is powered by Python OpenRPC. Refer to the Python OpenRPC docs hosted here for advanced use.

Getting Started

A basic Tabella app:

from tabella import Tabella

app = Tabella()


@app.method()
def echo(a: str, b: float) -> tuple[str, float]:
    """Echo parameters back in result."""
    return a, b


if __name__ == "__main__":
    app.run()

Run this, then open http://127.0.0.1:8000/ in your browser to use the interactive documentation.

The Open-RPC API will be hosted over HTTP on http://127.0.0.1:8000/api and over WebSockets on ws://127.0.0.1:8000/api.

Further Usage

Routers

An app with many modules can be organized into segments using Method Routers.

Security and Depends Arguments

Tabella passes request headers to the RPCServer process request methods. Details on usage can be found in the Python OpenRPC docs on Depends Arguments.

Set Servers

Set RPC servers manually to specify transport and paths to host the RPC server on, e.g.

from openrpc import Server
from tabella import Tabella

app = Tabella(
    servers=[
        Server(name="HTTP API", url="http://localhost:8000/my/api/path"),
        Server(name="WebSocket API", url="ws://localhost:8000/my/api/path"),
    ]
)

This app will host the RPCServer over HTTP and over WebSockets with the path /my/api/path.

Pydantic

Pydantic is used for request/response deserialization/serialization as well as schema generation. Pydantic should be used for any models as seen here in the Python OpenRPC Docs.

Starlette

Tabella HTTP and WebSocket server hosting uses Starlette. Uvicorn can be used to run the starlette app.

uvicorn main:app.starlette --reload

Monitor

If you are running the app with in debug mode, e.g. app = Tabella(debug=True), then at the path /monitor there is a display that will show requests and responses made to the RPC server as they happen.

This requires websockets

pip install websockets

Monitor

Inspired By

Support The Developer

Buy Me A Coffee

Metadata

Release files for tabella 2.4.1

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

Source distribution (sdist)

Source distribution for tabella 2.4.1
File Size Uploaded
tabella-2.4.1.tar.gz 215.5 kB Details

Built distribution (wheel)

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

Total release size: 470.2 kB

Release files / tabella-2.4.1.tar.gz

Download URL tabella-2.4.1.tar.gz
Size 215.5 kB
Tags Source
SHA-256 checksum
How to use checksums
932d012c4c22cc6214f6410da9b77af42d28b7d6b2b135d5cefb0ed4895b2f15
BLAKE2b-256 checksum
How to use checksums
91d86e62a88d51a3e6b027325487443996ae08f7278f72d218fe8e0def26237c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Release files / tabella-2.4.1-py3-none-any.whl

Download URL tabella-2.4.1-py3-none-any.whl
Size 254.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b32f8234abc52b424032e0d68bc6f1141acbe045ee86cc60a125ad77681c0337
BLAKE2b-256 checksum
How to use checksums
c9f07877a64353454e0386852ac6acd4449cfd4e16a13b9b7ff59acdbde8af23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11
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