Skip to content

Python Development Server Tools

Comprehensive Python virtual environment and development server management script for Linux/Unix systems.

Features

  • Virtual Environment Management: Create, activate, and manage Python virtual environments
  • Dependency Installation: Install packages from requirements.txt files
  • Development Server Support: Start HTTP servers, Django, Flask, and FastAPI applications
  • Port Management: Check and stop services running on specific ports
  • Status Monitoring: Check virtual environment and server status

Available Commands

Virtual Environment Management

  • create [venv_name] [python_version] - Create a new virtual environment
  • activate [venv_name] - Activate a virtual environment
  • status [venv_name] - Check virtual environment status

Dependency Management

  • install [venv_name] [requirements_file] - Install dependencies

Development Server Operations

  • start [venv_name] [port] [framework] - Start development server
  • check [port] - Check if server is running on port
  • stop [port] - Stop server running on specific port

Framework Support

  • HTTP Server: Simple Python HTTP server
  • Django: Django development server with manage.py
  • Flask: Flask development server
  • FastAPI: FastAPI with uvicorn

Usage Examples

# Create virtual environment
./docs/actions/dev-server-python-actions.sh create

# Activate environment and install dependencies
./docs/actions/dev-server-python-actions.sh activate
./docs/actions/dev-server-python-actions.sh install

# Start Django development server
./docs/actions/dev-server-python-actions.sh start venv 8000 django

# Check server status
./docs/actions/dev-server-python-actions.sh check 8000

File Location

  • Python Development Server Script: docs/actions/dev-server-python-actions.sh

Requirements

  • Python 3.x installed
  • Bash shell environment
  • Network access for package installation