Ushka is a minimal, experimental Python micro-framework for hobbyists and solo developers. Its goal is to enable rapid API development with zero boilerplate by using file-based routing.
Project description
Ushka
Ushka is a minimal, experimental Python ASGI web framework focused on file-based routing. It turns your filesystem into your API.
⚠️ Alpha Stage
This project is in early alpha. Expect breaking changes. Not for production use.
Installation
Install via pip:
pip install ushka
Core Idea: File-Based Routing
Ushka automatically maps Python files in a routes/ directory to URL endpoints:
routes/index.py→/routes/hello.py→/helloroutes/api/v1/status.py→/api/v1/status- Dynamic paths:
routes/users/[id].py→/users/<id> - HTTP method = function name (
get(),post(), etc.)
No decorators. No config. The filesystem is the API.
Example Project
Structure
examples/
├── app.py
└── routes/
├── index.py
├── hello.py
└── hello/
└── [name].py
Route Handlers
routes/index.py
def get():
return "Welcome to the autodiscovered example!"
routes/hello.py
def get():
return "Hello, World!"
routes/hello/[name].py
def get(name: str):
return f"Hello, {name}!"
Application Entry Point
app.py
from ushka import Ushka
app = Ushka()
if __name__ == "__main__":
print("Starting Ushka server on http://127.0.0.1:8000")
app.run("127.0.0.1", 8000)
Run
python examples/app.py
Then make requests:
GET /→ "Welcome to the autodiscovered example!"GET /hello→ "Hello, World!"GET /hello/<name>→ "Hello, !"
Manual Routing (Optional)
If you prefer explicit control:
from ushka import Ushka
app = Ushka()
def handler():
return "Manual route"
app.router.add_route("GET", "/manual", handler)
Roadmap
- Improve routing (static + dynamic)
- Request/Response objects
- Middleware support
- CLI for scaffolding
- Basic DI system
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ushka-0.0.5.tar.gz.
File metadata
- Download URL: ushka-0.0.5.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dc670e3608e53abd1db47d9ae813ef6bc2f7d358ebff7230bb8434c55dc3099
|
|
| MD5 |
656aefa7f14a6fdbdebd9b2a3a9ba378
|
|
| BLAKE2b-256 |
f2895ab4b0448ca86642fb39f1d9e684d161b4d0d66ca47de620df16949b4d6c
|
Provenance
The following attestation bundles were made for ushka-0.0.5.tar.gz:
Publisher:
python-publish.yml on kleber-code/ushka
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ushka-0.0.5.tar.gz -
Subject digest:
3dc670e3608e53abd1db47d9ae813ef6bc2f7d358ebff7230bb8434c55dc3099 - Sigstore transparency entry: 703685860
- Sigstore integration time:
-
Permalink:
kleber-code/ushka@51d8e3a84c74838f19188f2373570032f0fe9562 -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/kleber-code
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@51d8e3a84c74838f19188f2373570032f0fe9562 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ushka-0.0.5-py3-none-any.whl.
File metadata
- Download URL: ushka-0.0.5-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7501201dac6cfc7b6a6b85265a323d027bb43b6ce4a45c58144ec38a71c4946
|
|
| MD5 |
882c4603dd9c9e1eaa4e766dcdf8538a
|
|
| BLAKE2b-256 |
31ba5e0d63a9f4e58e2a24411e13dea4ec40b1ef4440b4269aa4ad8f3d80ab60
|
Provenance
The following attestation bundles were made for ushka-0.0.5-py3-none-any.whl:
Publisher:
python-publish.yml on kleber-code/ushka
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ushka-0.0.5-py3-none-any.whl -
Subject digest:
e7501201dac6cfc7b6a6b85265a323d027bb43b6ce4a45c58144ec38a71c4946 - Sigstore transparency entry: 703685899
- Sigstore integration time:
-
Permalink:
kleber-code/ushka@51d8e3a84c74838f19188f2373570032f0fe9562 -
Branch / Tag:
refs/tags/v0.0.5 - Owner: https://github.com/kleber-code
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@51d8e3a84c74838f19188f2373570032f0fe9562 -
Trigger Event:
push
-
Statement type: