SkillAgentSearch skills...

Minimalweb

A Minimal Python Web Framework

Install / Use

/learn @shahriarshm/Minimalweb
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

  1. Install Python v3.9 or later.
  2. Install virtualenv:
pip insatll virtualenv
  1. Create a virtual environment:
virtualenv venv
  1. Active the virtual environment (On UNIX):
source venv/bin/activate
  1. 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

View on GitHub
GitHub Stars13
CategoryDevelopment
Updated6mo ago
Forks0

Languages

Python

Security Score

67/100

Audited on Sep 18, 2025

No findings