NextDigital Docs
Guides 2 min read

Python IDE Environment

Python development with FastAPI, Flask, Django, data science tools, and pre-activated virtual environment.

What's Inside

Tool Version Purpose
Python 3.x Runtime
pip Latest Package manager
FastAPI Latest Modern async web framework
Flask Latest Lightweight web framework
Django Latest Full-featured web framework
numpy / pandas Latest Data science libraries
Jupyter / IPython Latest Interactive notebooks
pytest Latest Testing framework
ruff / mypy Latest Linting and type checking
black Latest Code formatter

Quick Start

# Run a Python file
py-run app.py

# Run tests
py-test

# Start a FastAPI server
py-serve app:app

# Start Jupyter notebook
py-jupyter

# Create a new project
py-init my-project

Helper Commands

Command What it does
py-run <file> Run a Python file
py-test Run pytest
py-serve app:app Start FastAPI/Flask with uvicorn
py-jupyter Start Jupyter notebook server
py-init <name> Scaffold a Python project
py-lint Run ruff + mypy on current directory
py-help Show all available commands

Virtual Environment

The environment comes with a pre-activated virtual environment. You don't need to create one — just use pip install directly:

pip install requests
pip install fastapi uvicorn

This avoids the externally-managed-environment error (PEP 668) that you'd normally see on modern Python.

Tips

  • The virtual environment is at /opt/learncen-venv/ and is always active
  • py-run without arguments runs main.py if it exists, or app.py
  • py-serve uses uvicorn with auto-reload — great for development
  • py-jupyter starts on port 8888 with no token required
  • VS Code is pre-configured to use the correct Python interpreter
  • Ctrl+Shift+B runs the current file

Security

  • Root access is restricted. Use sudo apt install <package> for system packages.
  • pip and python3 are whitelisted for sudo access.