Minimalweb
A Minimal Python Web Framework
Install / Use
/learn @shahriarshm/MinimalwebREADME
MinimalWeb
MinimalWeb is a Python Web Framework based on WSGI. It's just for ones that like to learn about implementing a web framework from scratch.
Course
You can watch the course behind this framework on youtube from here. videos are in Persian (Farsi) language.
How To Setup
- Install Python v3.9 or later.
- Install virtualenv:
pip insatll virtualenv
- Create a virtual environment:
virtualenv venv
- Active the virtual environment (On UNIX):
source venv/bin/activate
- Install all the requirements by using this command:
pip install -r requirements.txt
Quick Sample
from minimalweb import MinimalWeb, TextResponse, HtmlResponse
app = MinimalWeb()
# Render html using Jinja2
@app.route("/")
def index(req):
context = {
"users": ["user1", "user2"]
}
return HtmlResponse("index.html", context=context)
# Using Url Args
@app.route("/user/<string:username>")
def user(req, username):
return TextResponse(f"Hello, {username}")
# Start app
app.run()
More Options
- Serving static and dynamic files.
- Adding custom middlewares.
- Running web app without alternative web servers.
Contribution
Feel free to contribute to this project :)
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
