pyproject.toml, secrets safely stored in a .env file, and the whole thing backed up on GitHub. Doing this consistently from the start takes less than ten minutes and saves hours of debugging and recovery work later. Run through these steps for every project — including the small ones — until it becomes second nature.
Step 1: Open your terminal
Step 2: Navigate to your projects folder
Step 3: Create the project with uv
uv init generates a complete starting structure:
The
.venv folder and uv.lock are created automatically when you first run uv add. You don’t need to do anything extra.Step 4: Open in VS Code
If
code . doesn’t work, see the Git section for instructions on enabling the code shell command.Step 5: Add your dependencies
Open the integrated terminal in VS Code (Ctrl + `):
uv add call updates pyproject.toml and uv.lock automatically.
Step 6: Test that everything works
Editmain.py to verify your setup:
Step 7: Set up environment variables
Create.env for your actual secrets (this file stays on your machine only):
.env.example to document what variables are needed (this file is safe to commit):
Step 8: Initialize Git
.gitignore (including .venv and .env) are excluded automatically.
Step 9: Create and push to GitHub
- GitHub CLI (Recommended)
- Traditional Git
If you don’t have GitHub CLI yet, install it:Then authenticate:
gh auth loginThe daily workflow
From this point on, your everyday routine is:Quick reference cheat sheet
Project creation (one time):What’s next?
You’ve completed the Python tooling and project setup track. Continue with the weather data analysis project to put everything into practice.Weather data analysis project
Build a real-world data analysis project using APIs and visualization