Skip to main content

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.

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 renus CLI

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:

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.2

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

Source distribution (sdist)

Source distribution for renus 3.0.2
File Size Uploaded Provenance
renus-3.0.2.tar.gz 305.4 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for renus 3.0.2
File
renus-3.0.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
renus-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details
renus-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ ARM64 Details
renus-3.0.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details
renus-3.0.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
renus-3.0.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
renus-3.0.2-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
renus-3.0.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
renus-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.2+ x86-64 Details
renus-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl CPython 3.11 CPython 3.11 Linux musl 1.2+ ARM64 Details
renus-3.0.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details
renus-3.0.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details
renus-3.0.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
renus-3.0.2-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details

Total release size: 6.6 MB

Release files / renus-3.0.2.tar.gz

Download URL renus-3.0.2.tar.gz
Size 305.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8f3ed4dcd5a92d7432d390fac747c6c648e48b5aed52f57955202c90078ac6d9
BLAKE2b-256 checksum
How to use checksums
9d6dbe1c12397c2b965382011af9a429e9ca8a2c37f94d48bf4633760e9303e7
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp312-cp312-win_amd64.whl

Download URL renus-3.0.2-cp312-cp312-win_amd64.whl
Size 348.7 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
01ab4e75a14651b6e9319b162d004317e762e6e78820054b3d12c9c30f5170bb
BLAKE2b-256 checksum
How to use checksums
72f4ce52ad2f6fbaecd0c845fe666008b1b06f0059764042b69a29a334b0173c
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL renus-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl
Size 537.6 kB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
6ef36284e4097458e36d9d9f2bf6c74ea4fe32e425eb6baecc9831060b6970c9
BLAKE2b-256 checksum
How to use checksums
c1499df84e9fa60ab96da42d3de1310f6ba734c4c8d287d5e07abba906b19877
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl

Download URL renus-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl
Size 530.9 kB
Tags CPython 3.12 Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
d8614da43d4d17ed7f6e35ffb0b6f78b4fac509fc078e33691f76e34009b84b6
BLAKE2b-256 checksum
How to use checksums
03889756f14506a453ff58236c84c45cfd0194ab1cb9de12846bad2c5bcb3952
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL renus-3.0.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 532.1 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
728d0b769d5dc4e970054937b5f8a571018605826909e517f8fb9098022026ba
BLAKE2b-256 checksum
How to use checksums
64fcea743287dbd0b40ea844ec04152118746bdeb2995d5272ff50938325d5c8
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL renus-3.0.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 536.8 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
80fed36ffe304525ca741823b1816020cbf6e791515feaf78c7124d7eb28e15e
BLAKE2b-256 checksum
How to use checksums
356df067aba005182ca05f40b22efefe7488a927b207e823bf0bace281806042
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL renus-3.0.2-cp312-cp312-macosx_11_0_arm64.whl
Size 353.4 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c5a648127146e7f52a2c3d207638c8273983f68b803269487558912d115fd909
BLAKE2b-256 checksum
How to use checksums
2ad92a67d1460183b2c4b85e904266d229e024eaa67363450ea09df3370648c4
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp312-cp312-macosx_10_13_x86_64.whl

Download URL renus-3.0.2-cp312-cp312-macosx_10_13_x86_64.whl
Size 353.2 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
32c67b52e95283d55e2922f7d0f25ce8d73f575d3dedf45c4706cc7e4a301c14
BLAKE2b-256 checksum
How to use checksums
da69b0ffa2cc3e7976abd6ea5aae7cc4dde04b2433b1051ad9fc300b1ac7216a
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp311-cp311-win_amd64.whl

Download URL renus-3.0.2-cp311-cp311-win_amd64.whl
Size 348.5 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
25784285bbedc9f7d13690145995c83b5a5c002eb9c723083d584b3f0ef5d99b
BLAKE2b-256 checksum
How to use checksums
ae013f075c8fc23f42bf3bc3eba19cf9cf4a83a0af75907877ab45e627ce7b08
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl

Download URL renus-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl
Size 524.0 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
a473f67e91152f4e50e6ba58fe9fe23f97e01d45a1448e2c938e66fd11297034
BLAKE2b-256 checksum
How to use checksums
2265c7e388aee31a1fc42f1a4b26ebbf5951907bc6a3facbd735e89b5f73725b
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl

Download URL renus-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl
Size 520.7 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
4e9f455e202ef96e28b435b2d963cad3aa95fa4abe8c13f82437fffd4d9001cd
BLAKE2b-256 checksum
How to use checksums
d19c7b1894be8ea7ba32af356c4290bf012c8f7bf314f8e341f835546029cd11
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL renus-3.0.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 521.6 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
cc290cf397d3d5e2edeae2ef33aa3268141a2bea171face78ed786afaad38977
BLAKE2b-256 checksum
How to use checksums
3cfddb99c347a3120af78050abe5de8f3309fcde8b552ad347fc916737c62bae
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL renus-3.0.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 521.5 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
38c02b2cb994b5448e3f8d3a86790c216f3aaeedbdd1fd8521be752f54aa76f5
BLAKE2b-256 checksum
How to use checksums
77699d84e295c0796f5da2efbbb9a10e0d7cedaf5ad5ada417dc2df414a066a3
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL renus-3.0.2-cp311-cp311-macosx_11_0_arm64.whl
Size 353.5 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
74622250f5d9da2609465f0507f07038a09e83462fc702b7bf0c8c95d8eedc6f
BLAKE2b-256 checksum
How to use checksums
1ea07d316806bff2f43aa42fe0256cf3076ee5ce21b8e11fcfb911851c2af855
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 20, 2026.

Transparency log

Release files / renus-3.0.2-cp311-cp311-macosx_10_9_x86_64.whl

Download URL renus-3.0.2-cp311-cp311-macosx_10_9_x86_64.whl
Size 353.4 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
bf6b5add9eb8a7268903622dff8075dd987691aa3ea1202b990f251017c994cb
BLAKE2b-256 checksum
How to use checksums
7f7b666e44fa70c81cf686367b8f10d546e9b0e71ceb1f2679015e9cc29ec2e0
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 20, 2026.

Transparency log

Security for renus 3.0.2

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.

Full provenance

All 15 files in this release have been uploaded with provenance metadata.

Select from 15 files

Attestation for renus-3.0.2.tar.gz

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 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.2 This release

15 release files Full provenance

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