Skip to main content
This page brings everything together into a repeatable workflow you can follow for every new Python project. By the end of this walkthrough, you will have a project that is set up locally with uv, tracked by Git, backed up on GitHub, and configured with proper environment variable handling. This is the real-world professional setup used for Python and AI development projects.

The complete workflow at a glance

1

Open your terminal

Open your system terminal:
  • macOS: Terminal or iTerm2
  • Windows: Windows Terminal, PowerShell, or Command Prompt
  • Linux: Your preferred terminal emulator
2

Navigate to your projects folder

Keep all your Python projects in one dedicated folder. It makes everything easier to find and back up.
3

Create the project with uv

uv creates this structure instantly:
The .venv folder and uv.lock are created automatically when you first run uv add. They do not exist yet at this stage.
4

Open the project in VS Code

VS Code opens, the Python extension detects your project, and the virtual environment will be recognised automatically once you install packages.
If code . does not work, install the VS Code CLI by opening VS Code, pressing Ctrl/Cmd + Shift + P, and running Shell Command: Install ‘code’ command in PATH.
5

Add your project's packages

Open the integrated terminal in VS Code (Ctrl + `) and install what your project needs:
After these commands, uv has:
  • Created .venv/ with all packages installed
  • Updated pyproject.toml with your declared dependencies
  • Generated uv.lock with exact reproducible versions
Then select the virtual environment as your interpreter: press Ctrl/Cmd + Shift + PPython: Select Interpreter → choose the .venv option.
6

Test your setup

Edit main.py to verify everything works:
Run it:
7

Set up environment variables

Create a .env file for your secrets (API keys, database URLs, etc.):
Create a .env.example as a safe template to commit:
Never commit your actual .env file to version control. It already appears in the .gitignore that uv created, but double-check before your first commit.
8

Initialise Git

This creates your first Git snapshot. Your .venv/ and .env are already excluded by uv’s .gitignore.
9

Create a GitHub repository

Your project is now backed up on GitHub and ready for collaboration.

Your daily development workflow

After the initial setup, your day-to-day routine is simple:
You can do all Git operations through VS Code’s Source Control panel (Ctrl/Cmd + Shift + G) if you prefer clicking over typing. Stage files, write commit messages, and push — all without leaving the editor.

Quick reference: the full setup in one block

Pro tips for sustainable projects

  1. Commit often — small, focused commits are easier to understand and revert than large ones
  2. Write clear commit messages — “Fix login validation bug” is far more useful than “updates”
  3. Keep secrets in .env — never hardcode API keys, passwords, or tokens in your source files
  4. Update dependencies regularly — run uv sync --upgrade periodically to stay on secure, maintained versions
  5. One virtual environment per project — never share environments across projects, even if they look similar

Course Resources

Access all practice notebooks, exercise files, and real-world datasets for the course.