Skip to main content

Python Basic Webserver

Python Basic Webserver logo
Python Basic Webserverv1.0.0

Minimal Flask server with health endpoint and Docker support

A minimal Python web server using Flask with a health check endpoint. Includes Docker containerization, Kubernetes deployment manifests, and GitHub Actions CI/CD workflow. Ideal for microservices and API backends.

Tools: dev-python
Install:dev-template python-basic-webserver
Maintainers: terchristerchris
GETTING STARTED

Prerequisites

Files

ENVIRONMENT

What gets set up

When you install this template, the following are configured for you:

In your devcontainer

Setup

uv venv
uv pip install -r requirements.txt

Run the Flask app

uv run python app/app.py

Flask runs on port 3000. VS Code auto-forwards the port — click the globe icon in the Ports tab.

ARCHITECTURE

Architecture

These diagrams are auto-generated from the template's metadata. Click any diagram to enlarge.

Deployment

Template README

The Python Basic Webserver template is a simple hello world app built with Flask that displays "Hello world" on a web page. The purpose of this simple app is to verify that the development environment is set up and ready. See more documentation at http://localhost:3000/docs/templates/basic-web-server/python-basic-webserver

HTTP API

PathMethodResponse
/GETPlain text: greeting, template id python-basic-webserver, and formatted time/date

Entry point and port

  • File: app/app.py
  • Port: 3000 (variable port in the module; matches the Dockerfile EXPOSE)
  • Run: pip install -r requirements.txt then python app/app.py (Flask debug is enabled in __main__ — auto-reload on save)

Changing the app

  • Add Flask routes with @app.route and extend app.py, or split into blueprints under app/.