tabella


Nametabella JSON
Version 2.3.19 PyPI version JSON
download
home_pagehttps://gitlab.com/mburkard/tabella
SummaryOpen-RPC API hosting and interactive documentation.
upload_time2024-12-01 19:33:20
maintainerNone
docs_urlNone
authorMatthew Burkard
requires_python<4.0,>=3.10
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tabella

![](https://img.shields.io/badge/License-ApacheV2-blue.svg)
![](https://img.shields.io/badge/code%20style-black-000000.svg)
![](https://img.shields.io/pypi/v/tabella.svg)

## Open-RPC development framework with builtin interactive documentation.

![Demo](https://gitlab.com/mburkard/tabella/-/raw/main/docs/demo.png)

## Live Demo

A live demo is available [here](https://tabella.burkard.cloud/).

## Install

Tabella is on PyPI and can be installed with:

```shell
pip install tabella
```

Or with [Poetry](https://python-poetry.org/)

```shell
poetry add tabella
```

## Python OpenRPC Docs

The RPC server hosted and documented by Tabella is powered
by [Python OpenRPC](https://gitlab.com/mburkard/openrpc). Refer to the Python OpenRPC
docs hosted [here](https://python-openrpc.burkard.cloud/) for advanced use.

## Getting Started

A basic Tabella app:

```python
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](https://python-openrpc.burkard.cloud/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](https://python-openrpc.burkard.cloud/security).

### Set Servers

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

```python
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](https://docs.pydantic.dev/latest/) 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](https://python-openrpc.burkard.cloud/basics#pydantic-for-data-models).

### Starlette

Tabella HTTP and WebSocket server hosting uses [Starlette](https://www.starlette.io/).
[Uvicorn](https://www.uvicorn.org/) can be used to run the starlette app.

```shell
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`

```shell
pip install websockets
```

![Monitor](https://gitlab.com/mburkard/tabella/-/raw/main/docs/monitor_demo.png)

## Inspired By

- [OPEN-RPC Playground](https://playground.open-rpc.org/)
- [Swagger](https://swagger.io/)
- [Redoc](https://github.com/Redocly/redoc)

## Support The Developer

<a href="https://www.buymeacoffee.com/mburkard" target="_blank">
  <img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png"
       width="217"
       height="60"
       alt="Buy Me A Coffee">
</a>

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/mburkard/tabella",
    "name": "tabella",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Matthew Burkard",
    "author_email": "matthewjburkard@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d4/05/dbb96bdb2b79a20063fbf38713437267e96498b3cd1bd2e98c82be6a8e45/tabella-2.3.19.tar.gz",
    "platform": null,
    "description": "# Tabella\n\n![](https://img.shields.io/badge/License-ApacheV2-blue.svg)\n![](https://img.shields.io/badge/code%20style-black-000000.svg)\n![](https://img.shields.io/pypi/v/tabella.svg)\n\n## Open-RPC development framework with builtin interactive documentation.\n\n![Demo](https://gitlab.com/mburkard/tabella/-/raw/main/docs/demo.png)\n\n## Live Demo\n\nA live demo is available [here](https://tabella.burkard.cloud/).\n\n## Install\n\nTabella is on PyPI and can be installed with:\n\n```shell\npip install tabella\n```\n\nOr with [Poetry](https://python-poetry.org/)\n\n```shell\npoetry add tabella\n```\n\n## Python OpenRPC Docs\n\nThe RPC server hosted and documented by Tabella is powered\nby [Python OpenRPC](https://gitlab.com/mburkard/openrpc). Refer to the Python OpenRPC\ndocs hosted [here](https://python-openrpc.burkard.cloud/) for advanced use.\n\n## Getting Started\n\nA basic Tabella app:\n\n```python\nfrom tabella import Tabella\n\napp = Tabella()\n\n\n@app.method()\ndef echo(a: str, b: float) -> tuple[str, float]:\n    \"\"\"Echo parameters back in result.\"\"\"\n    return a, b\n\n\nif __name__ == \"__main__\":\n    app.run()\n```\n\nRun this, then open http://127.0.0.1:8000/ in your browser to use the interactive\ndocumentation.\n\nThe Open-RPC API will be hosted over HTTP on `http://127.0.0.1:8000/api` and over\nWebSockets on `ws://127.0.0.1:8000/api`.\n\n## Further Usage\n\n### Routers\n\nAn app with many modules can be organized into segments\nusing [Method Routers](https://python-openrpc.burkard.cloud/method_routers).\n\n### Security and Depends Arguments\n\nTabella passes request headers to the RPCServer process request methods. Details on\nusage can be found in the Python OpenRPC docs on\n[Depends Arguments](https://python-openrpc.burkard.cloud/security).\n\n### Set Servers\n\nSet RPC servers manually to specify transport and paths to host the RPC server on, e.g.\n\n```python\nfrom openrpc import Server\nfrom tabella import Tabella\n\napp = Tabella(\n    servers=[\n        Server(name=\"HTTP API\", url=\"http://localhost:8000/my/api/path\"),\n        Server(name=\"WebSocket API\", url=\"ws://localhost:8000/my/api/path\"),\n    ]\n)\n```\n\nThis app will host the RPCServer over HTTP and over WebSockets with the\npath `/my/api/path`.\n\n### Pydantic\n\n[Pydantic](https://docs.pydantic.dev/latest/) is used for request/response\ndeserialization/serialization as well as schema generation. Pydantic should be used for\nany models as seen here in\nthe [Python OpenRPC Docs](https://python-openrpc.burkard.cloud/basics#pydantic-for-data-models).\n\n### Starlette\n\nTabella HTTP and WebSocket server hosting uses [Starlette](https://www.starlette.io/).\n[Uvicorn](https://www.uvicorn.org/) can be used to run the starlette app.\n\n```shell\nuvicorn main:app.starlette --reload\n```\n\n## Monitor\n\nIf you are running the app with in debug mode, e.g. `app = Tabella(debug=True)`, then at\nthe path `/monitor` there is a display that will show requests and responses made to the\nRPC server as they happen.\n\nThis requires `websockets`\n\n```shell\npip install websockets\n```\n\n![Monitor](https://gitlab.com/mburkard/tabella/-/raw/main/docs/monitor_demo.png)\n\n## Inspired By\n\n- [OPEN-RPC Playground](https://playground.open-rpc.org/)\n- [Swagger](https://swagger.io/)\n- [Redoc](https://github.com/Redocly/redoc)\n\n## Support The Developer\n\n<a href=\"https://www.buymeacoffee.com/mburkard\" target=\"_blank\">\n  <img src=\"https://cdn.buymeacoffee.com/buttons/v2/default-blue.png\"\n       width=\"217\"\n       height=\"60\"\n       alt=\"Buy Me A Coffee\">\n</a>\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Open-RPC API hosting and interactive documentation.",
    "version": "2.3.19",
    "project_urls": {
        "Homepage": "https://gitlab.com/mburkard/tabella",
        "Repository": "https://gitlab.com/mburkard/tabella"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f18417272e59781f74ad55d6ee7c70b508d2eafb0cd3ab1e7602e8378ea50b72",
                "md5": "fc228d3bf31987c59a267c7d7e666df2",
                "sha256": "f3ee25e70fecde80ce28b91b77d5e011f9c0311a24725aefabf94f8e15a78a7a"
            },
            "downloads": -1,
            "filename": "tabella-2.3.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fc228d3bf31987c59a267c7d7e666df2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 244768,
            "upload_time": "2024-12-01T19:33:18",
            "upload_time_iso_8601": "2024-12-01T19:33:18.757754Z",
            "url": "https://files.pythonhosted.org/packages/f1/84/17272e59781f74ad55d6ee7c70b508d2eafb0cd3ab1e7602e8378ea50b72/tabella-2.3.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d405dbb96bdb2b79a20063fbf38713437267e96498b3cd1bd2e98c82be6a8e45",
                "md5": "fab9d83770c2f94e60b301b39735faf3",
                "sha256": "a9338dfe527c76f7b060a067ccb9e40637f10be2c414b19ca76a33c1f3798d03"
            },
            "downloads": -1,
            "filename": "tabella-2.3.19.tar.gz",
            "has_sig": false,
            "md5_digest": "fab9d83770c2f94e60b301b39735faf3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 212681,
            "upload_time": "2024-12-01T19:33:20",
            "upload_time_iso_8601": "2024-12-01T19:33:20.791481Z",
            "url": "https://files.pythonhosted.org/packages/d4/05/dbb96bdb2b79a20063fbf38713437267e96498b3cd1bd2e98c82be6a8e45/tabella-2.3.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-01 19:33:20",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "mburkard",
    "gitlab_project": "tabella",
    "lcname": "tabella"
}
        
Elapsed time: 0.63200s