PYTHON DEV SERVER MANAGEMENT¶
CREATING VIRTUAL ENVIRONMENT¶
Option 1: Create virtual environment with default settings¶
Use this when: Creating a Python virtual environment with default name and Python version. This is the DEFAULT option - use this unless the user specifically requests a different name or Python version.
Option 2: Create virtual environment with custom name¶
Use this when: The user has specifically requested a custom virtual environment name. DO NOT use this unless the user explicitly asks for a non-default name.
Option 3: Create virtual environment with custom name and Python version¶
Use this when: The user has specifically requested both a custom name AND a specific Python version. DO NOT use this unless the user explicitly specifies both parameters.
ACTIVATING VIRTUAL ENVIRONMENT¶
Option 1: Activate default virtual environment¶
Use this when: Activating the virtual environment. This is the DEFAULT option - use this unless the user specifically mentions a different environment name.
Option 2: Activate specific virtual environment¶
Use this when: The user has specifically mentioned a custom virtual environment name to activate. DO NOT use this unless the user explicitly mentions a non-default environment name.
INSTALLING DEPENDENCIES¶
Option 1: Install dependencies with default settings¶
Use this when: Installing Python dependencies from requirements.txt. This is the DEFAULT option - use this unless the user specifically requests different parameters.
Option 2: Install dependencies in specific virtual environment¶
Use this when: The user has specifically mentioned a custom virtual environment name. DO NOT use this unless the user explicitly mentions a non-default environment name.
Option 3: Install dependencies from custom requirements file¶
Use this when: The user has specifically mentioned a custom requirements file name. DO NOT use this unless the user explicitly specifies a non-default requirements file.
STARTING THE DEV SERVER¶
Option 1: Start simple HTTP server with default settings¶
Use this when: Starting a Python development server with default settings. This is the DEFAULT option - use this unless the user specifically requests different parameters.
Option 2: Start server on specific port¶
Use this when: The user has specifically requested a custom port number. DO NOT use this unless the user explicitly asks for a non-default port.
Option 3: Start Django development server¶
Use this when: The user has specifically mentioned Django or you detect a Django project (manage.py present). DO NOT use this unless explicitly requested or Django is detected.
Option 4: Start Flask development server¶
Use this when: The user has specifically mentioned Flask or you detect a Flask project (app.py/main.py present). DO NOT use this unless explicitly requested or Flask is detected.
Option 5: Start FastAPI development server¶
Use this when: The user has specifically mentioned FastAPI or you detect a FastAPI project. DO NOT use this unless explicitly requested or FastAPI is detected.
CHECKING IF THE DEV SERVER IS ACTIVE¶
Option 1: Check server status on default port (8000)¶
Use this when: Checking if a Python development server is running. This is the DEFAULT option - use this unless the user specifically mentions a different port.
Option 2: Check server status on a specific port¶
Use this when: The user has specifically mentioned a custom port number that you need to check. DO NOT use this unless the user explicitly mentions a non-default port.
CLOSING THE DEV SERVER¶
Option 1: Stop server on default port (8000)¶
Use this when: Stopping a Python development server. This is the DEFAULT option - use this unless the user specifically mentions a different port.
Option 2: Stop server on a specific port¶
Use this when: The user has specifically mentioned a custom port number that needs to be stopped. DO NOT use this unless the user explicitly mentions a non-default port.
CHECKING VIRTUAL ENVIRONMENT STATUS¶
Option 1: Check default virtual environment status¶
Use this when: Checking the status of the virtual environment. This is the DEFAULT option - use this unless the user specifically mentions a different environment name.
Option 2: Check specific virtual environment status¶
Use this when: The user has specifically mentioned a custom virtual environment name to check. DO NOT use this unless the user explicitly mentions a non-default environment name.
ADDITIONAL HELP¶
For more information and usage examples: