Rapis - Minimalistic web framework based on RSGI
this framework was inspired by FastAPI so syntax may be identical
⚠️ WARNING: Framework in early development, it is NOT READY for production
Key features:
- Easy to use: Syntax was inspired by your favourite framework
- Fast: Built on native RSGI protocol with MsgSpec support
- Async Only: Supports only work with async requests handling
- Validation: Built-in support of MsgSpec providing first-class Validation Speed
- Functional that actually MATTER: Framework contains Only what you need to build API without unnecessary dependencies
Requirements
- msgspec: A fast serialization and validation library
Installation
pip install rapis
# install any rsgi compatible web-server
pip install granian
# or simply
pip install rapis[standard] # includes granian in requirements
Example
# main.py
from rapis import AppRouter, Query, WebApp
router = AppRouter()
@router.get("/")
async def root() -> dict:
return {}
@router.get("/echo")
async def parametrized_handler(
data: Query[str] = "default",
) -> str: # for now waiting for /echo?data=str if not given adds "default"
return data
app = WebApp()
app.include_router(router)
Run
granian main:app
Better Example
# routes.py
from msgspec import Struct
from rapis import AppRouter, Query
router = AppRouter()
class Item(Struct):
name: str
@router.get("/queries_with_struct")
async def fetch_item(item: Query[Item]): # no default means required and will expect to receive all fields in query params
return Item(name="query") # automatically parses to {"name": "query"}
@router.post("/echo") # also put, patch
async def fetch_item(item: Item): # will try to read and validate all fields from body
return item
# main.py
from rapis import WebApp
from routes import router
app = WebApp()
app.include_router(router)
more examples
Performance
see benchmarks
Docs
see wiki
TODO
- Exception handling
- Built-in exception handlers (validation, json parsing)
- Benchmarks section
- Request/Response Work model
- Docs
- More availabilities to expand logic (custom routes and other)
- better Query params handle
- change routing from linear to something else (hash maps for static paths, ?? for dynamic paths)
- path patterns logic
- review Middleware logic
- websocket support(maybe)
- coverage
- typing support in TY
- some examples
- Problem: how to authenticate users?
- Problem: how to send files?
- Problem: how to work with cookies?
- https://jcristharif.com/msgspec/perf-tips.html
CONTRIBUTING
see CONTRIBUTING.md
Release files for rapis 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rapis-0.0.4.tar.gz | 16.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rapis-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.2 kB
Release files / rapis-0.0.4.tar.gz
| Download URL | rapis-0.0.4.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55381652e98f77dcf4a692cc6051ba5b4a48633267162369ac89858c76bf62d1
|
|
BLAKE2b-256 checksum How to use checksums |
d5e03064d888e7ebfd315a17b8a1c791450bf670e982bcf202efe2df833aff09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 19, 2026.
Transparency logRelease files / rapis-0.0.4-py3-none-any.whl
| Download URL | rapis-0.0.4-py3-none-any.whl |
|---|---|
| Size | 19.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd170007c8c1eba91fffe71a6ae9142d786169f463cf55ae1867008941d7ae86
|
|
BLAKE2b-256 checksum How to use checksums |
66b4800c3436fbbda7773d891452f7ddbcb5b94d51a06db4f2d2c99b6dcc0a4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 19, 2026.
Transparency log