
Over the past few weeks, I’ve been experimenting with building a small web framework that combines Python’s simplicity with Rust’s performance.
The idea is pretty straightforward
Use rust for networking to handle request
Use python for business logic
Why this project?:
Frameworks like Flask and FastAPI are awesome, but I was curious about Python web frameworks’ request-handling limits. Benchmarks on my machine showed pretty low numbers, so I thought, what if we offload the networking part to Rust and focus purely on business logic?. Introducing SlimeWeb. Its still early stage and experimenting but works.
Some of the things its currently supports:
Python handler functions
Rust powered HTTP server
Multiple worker pool model
Sync & Async handler
Multipart form support
File uploads
Streaming Response
Cookie signing
Custom headers
JSON / HTML / Raw Response
Templates rendering with context
Static serving
Hot reload of templates in dev mode
WebSocket
App State
Compression
Middleware plugin
from slimeweb import Slime app = Slime(__file__) @app.route(path="/", method="GET") def home(req, resp): return resp.plain("Hello World from slime") if __name__ == "__main__": app.serve(dev=True)
The project is aimed at developers who wants to build APi’s/backend services. who wanna use the power of rust networking.
Slimeweb is mostly written in Rust, so it takes care of all the networking and template rendering for you. That means you can just focus on writing your business logic in Python. Since Rust handles the heavy lifting, it usually performs much better than frameworks like Flask or FastAPI.
It runs as a single process with multiple workers, and if you disable the GIL, you can get an extra performance boost. In simple benchmarks without the GIL, it handled up to 120k requests per second using 8 workers with wrk.
In Microbenchmark for sync handlers ive tested on linux with 8cpu cores with same python runtime without gil and 8worker using wrk. It beat both flask and fastapi.

Github: https://github.com/ATOMMAX-2001/Slime
Pypi: https://pypi.org/project/SlimeWeb/
Any feedback, critics, contributions is appreciated. Thank you
