Renus
Renus is a lightweight, async-first ASGI framework and toolkit for building Python web applications and services. It provides routing, HTTP and WebSocket handling, middleware, lifecycle hooks, caching, scheduling, validation, and an async database layer while keeping the core dependency footprint small.
- Current version: 3.0.0
- Python: 3.11+
- License: BSD-3-Clause
- Documentation: codenus.com/renus
- Source: github.com/kak-smko/renus
Features
- ASGI application support for HTTP, WebSockets, and lifespan events
- Decorator-based and fluent routing with typed path parameters
- Text, HTML, JSON, redirect, file, streaming, and private responses
- Application, router, and route-level middleware
- Request parsing for headers, cookies, query parameters, JSON, forms, and uploads
- Built-in XSS protection for form and WebSocket input helpers
- Background tasks and startup/shutdown hooks
- File- and Redis-backed caching, including route and function caching
- Async ORM with models, validation, repositories, queries, mutations, and transactions
- SQLite, MySQL, and MongoDB integrations through optional dependencies
- Database migrations, backup/restore, and plugin hooks
- Fluent task scheduling and a built-in
renusCLI
Installation
Renus requires Python 3.11 or newer. Install the core package with pip:
python -m pip install renus
Renus is an ASGI framework. Install the server extra when you want to run an
application with Uvicorn or with App.run():
python -m pip install "renus[server]"
Optional extras are available for additional integrations:
| Extra | Provides |
|---|---|
server |
Uvicorn |
mongo |
MongoDB support via pymongo |
mysql |
MySQL support via aiomysql |
redis |
Redis caching support |
all |
All runtime integrations |
dev |
Development and benchmarking dependencies |
Install from source in editable mode:
git clone https://github.com/kak-smko/renus.git
cd renus
python -m pip install -e ".[dev]"
Quick start
Create main.py:
from renus.app import App
from renus.response import JsonResponse, TextResponse
app = App()
@app.get("/")
def home():
return TextResponse("Hello, world!")
@app.get("/users/{username}")
def user(username):
return JsonResponse({"name": username})
Run the application with Uvicorn:
uvicorn main:app --host 127.0.0.1 --port 8000 --reload
Then visit http://127.0.0.1:8000/ or call the parameterized route:
curl http://127.0.0.1:8000/users/renus
# {"name":"renus"}
You can also use Renus's convenience runner:
if __name__ == "__main__":
app.run(host="127.0.0.1", port=8000, reload=True)
python main.py
WebSockets
WebSocket routes use @app.route(..., method="WS"):
from renus.websockets import WebSocketDisconnect
@app.route("/echo", method="WS")
async def echo(ws):
await ws.accept()
try:
async for message in ws.iter_text():
await ws.send_text(message)
except WebSocketDisconnect:
pass
Database example
Renus includes an async ORM. The following example uses the built-in SQLite adapter:
from renus.db import Database, DatabaseField, Field, Model, SQLiteAdapter
class User(Model):
id: int = Field(database=DatabaseField(primary_key=True, generated=True))
username: str = Field(database=DatabaseField(unique=True))
email: str
async def create_user():
async with Database(SQLiteAdapter({"database": "storage/app.sqlite"})) as db:
await db.create_schema([User])
users = db.repository(User)
return await users.create(
User(username="ada", email="ada@example.com")
)
For production applications, initialize shared database resources in an application lifespan hook and use migrations for schema changes.
CLI
The package exposes both a renus command and a module entry point:
renus --help
renus --version
python -m renus --help
Project commands can be added under a project's commands/ directory. See the
CLI documentation for command discovery,
scaffolding, database commands, and extensions.
Documentation
The full documentation covers:
- Installation
- Quick start
- Project structure
- Application and routing
- Requests and responses
- Middleware
- WebSockets
- Lifespan and background tasks
- Caching and scheduling
- Database, models, queries, and migrations
- Validation and security
- CLI reference
Development
Install the development dependencies and run the test suite:
python -m pip install -e ".[dev]"
pytest
Run a focused test module while developing:
pytest tests/test_routing.py
Contributing
Bug reports, documentation improvements, tests, and code contributions are welcome. Please keep changes focused, add regression tests for behavior changes, and follow the existing project style.
Support Renus
If Renus is useful to you, please consider giving the project a star on GitHub. It helps others discover the framework and supports continued development.
A GitHub star is appreciated but voluntary; it is not a condition of using, copying, modifying, or distributing Renus under the BSD 3-Clause License.
License
Renus is distributed under the BSD 3-Clause License.
Metadata
Release files for renus 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| renus-3.0.1.tar.gz | 304.7 kB | Details |
Built distributions (wheels)
Total release size: 6.6 MB
Release files / renus-3.0.1.tar.gz
| Download URL | renus-3.0.1.tar.gz |
|---|---|
| Size | 304.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10318e2501beb5f5bfa86364a069332ca08e20e5b6083914d4990171f8b7ef41
|
|
BLAKE2b-256 checksum How to use checksums |
d2c4a0df85eae9ab785e2f5455d118d77e5be9f483e0c6fd8cf7929e4167c740
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp312-cp312-win_amd64.whl
| Download URL | renus-3.0.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 348.3 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c8a99ee86c06f85b9fc5ec8858ff7dae9027d65d4d002108d455bc169681e064
|
|
BLAKE2b-256 checksum How to use checksums |
04eab6a007910862164e086a4cdeb3e78ee2eaddd50b32e2c71760cf3342df82
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | renus-3.0.1-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 537.2 kB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
4c0a49ca2c5811e6a7320d6f8bf4808d61445547044ea7577f5bf2d1f2691a08
|
|
BLAKE2b-256 checksum How to use checksums |
aabeb4d3681b9eddc3ade6d867a581095d4d18b67db048087f253f13f5781f30
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp312-cp312-musllinux_1_2_aarch64.whl
| Download URL | renus-3.0.1-cp312-cp312-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 530.6 kB |
| Tags | CPython 3.12 Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
e2f8ade4d37d9ea716f7c2892e1ee881140cbf8da108cd223b8bac8bf79ae76d
|
|
BLAKE2b-256 checksum How to use checksums |
75e4b52896356e8b691b10f9b4fbaf54f2e2c9248a55c319e7076b4882450c0c
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | renus-3.0.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 531.8 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
1bce01b9b418d38e345e95672433bc63b3bc55e94bd4eaabe16708c086efb562
|
|
BLAKE2b-256 checksum How to use checksums |
81e9e1c1af7f4b808032e507d94ea95e82e8148ac9c3b620bb33c2e4030b287c
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | renus-3.0.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 536.5 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
9199d308e0f80d4e6db5dd8506be2d5c82251b61b405b613b58c1cf9100b5ce9
|
|
BLAKE2b-256 checksum How to use checksums |
1285e7f5875de9492c834478d868615d30e551d5ddd5dbd10a4dfaebb1336c64
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | renus-3.0.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 353.1 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2635a4641ed7582fe775d0d37c1c633ac985f33031563325d880dead16c2112a
|
|
BLAKE2b-256 checksum How to use checksums |
6a21af3e9408e47b10378ab9f9de8dbae6f4636d7eb870bec869e921fd9fba6d
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | renus-3.0.1-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 352.9 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
16ad9b344622978378c7d26db57424b3f42fb968c658adf32a2c49af0bd609a4
|
|
BLAKE2b-256 checksum How to use checksums |
e6001a36f4169aef153b439fb865060efad1fda9271f46bc8d769969a62b3b2b
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp311-cp311-win_amd64.whl
| Download URL | renus-3.0.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 348.1 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
619d135ffe5a8879196683e1bc8df16b531af158ad3773db3dc034c1368964f7
|
|
BLAKE2b-256 checksum How to use checksums |
d20f938caae57624680648ca8ef381801440c626db18d60adbbec695de3bcfcf
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | renus-3.0.1-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 523.6 kB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
1634e9e9a1da8ea095a4181cfd576fba4489e33ef8a2c639bdd6611eb206050a
|
|
BLAKE2b-256 checksum How to use checksums |
ddc3e43b6e1ec891f5e4c1c924a0d2f3cc999d3a2c04d809f9adf8fcef87d59e
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp311-cp311-musllinux_1_2_aarch64.whl
| Download URL | renus-3.0.1-cp311-cp311-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 520.4 kB |
| Tags | CPython 3.11 Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
869c3d49d09c3a373264ad8ef7b5a9d3933a45eb2cb4012cb8776f788b1a0831
|
|
BLAKE2b-256 checksum How to use checksums |
3cb176fc2522be6d59dd73c0957c78e890c33dd35c4e84b16cc9f4cd50cf4eb2
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | renus-3.0.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 521.3 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
edfb82248fff7e8aed5b58e2c3bde814b543054f3b587dfa3c2394a394deb552
|
|
BLAKE2b-256 checksum How to use checksums |
6e0a1ce848d7c79f80744fea2952ae466b61bec79d704a9980d5196df93dc7c5
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
| Download URL | renus-3.0.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl |
|---|---|
| Size | 521.1 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
d855f2524e02e401a83b0aea173a7be8ca9dcd87f0293bcceb6fef0e730a4b27
|
|
BLAKE2b-256 checksum How to use checksums |
360cb4973d04b375143322252b4beefc7e4a0aecbeaa00b8ae2657f1dcaa0111
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | renus-3.0.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 353.2 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e3fa43999ebdce16e579a44f5a508a362a2d9b40b024f7b98e558715fbbd2f31
|
|
BLAKE2b-256 checksum How to use checksums |
86d72894f50e6fa13fc662f7ef9e113c2c9b7aa8981c6c956e66918bbd426dcd
|
| 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 15, 2026.
Transparency logRelease files / renus-3.0.1-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | renus-3.0.1-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 353.0 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f71ae4b757de5948598b59ec3218fb506f7b97283df853774c3606906689f105
|
|
BLAKE2b-256 checksum How to use checksums |
f7c3af3671287cc2df0805680a3033f2923d4f9999c4e05ce7c99e2aef136568
|
| 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 15, 2026.
Transparency log