Registry / web-framework / ratio
library0.4.0pypypi✓ verified 82d ago

Ratio is a Python web framework designed for productivity, inspired by Flask and FastAPI. It provides a minimalist, expressive routing system and encourages rapid development. The current version is 0.4.0, targeting Python >=3.11, with a monthly release cycle.

pip install ratio
INSTALL
IMPORT
SIG · RATIO
R
ratio
web-frameworkpythonv0.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Ratio
import ratio
from ratio import Ratio

Minimal Ratio application with a single route.

from ratio import Ratio app = Ratio() @app.route('/') def home(request): return 'Hello, World!' if __name__ == '__main__': app.run()
ratio --version
Debug
Known issues
gotchaVersion 0.3.0 changed the import path from `ratio.core` to `ratio`. Old code using `from ratio.core import Ratio` will break.
fix
Use `from ratio import Ratio`.
affects: >=0.3.0
gotchaRoute handlers must accept at least a `request` parameter. Omitting it causes a TypeError at runtime.
fix
Define handlers with `def handler(request):` even if request is unused.
affects: all
Upgrade
Version history
0.4.0latest on PyPI · released Jul 7, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
ratio — pip install ratio · libregistry