The Local Dev Setup Cheat Sheet I Wish I Had When I Started 🐍⚑

●3 ●7
calendar_today β€’ schedule1 min read
β€” Originally published at dev.to

Brian Kipchirchir
Brian Kipchirchir
Posted on 25 Aug

1
The Local Dev Setup Cheat Sheet I Wish I Had When I Started 🐍⚑
πŸ—‚οΈProject WITHOUT React/Vite (Python backend + plain HTML/CSS/JS frontend)

Backend:

source .venv/bin/activate
python app.py

Frontend (no build tool needed β€” just serve the static files):

python3 -m http.server 5500

or right-click index.html β†’ "Open with Live Server" if you're in VS Code.

βš›οΈ Project WITH React/Vite (Python backend)

Backend:

source .venv/bin/activate
python app.py

Frontend:

npm run dev

πŸ—‘οΈ Deleting a virtual environment

deactivate
rm -rf .venv

✨ Creating a fresh one

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

πŸ†• First time in a project only do:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

πŸ” Every time after:

source .venv/bin/activate
python app.py

πŸ” Check if venv exists:
ls -a β†’ spot .venv in the list

βœ… Check if venv is actually active:
which python β†’ should point inside .venv
⚠️ don't fully trust the (.venv) label in your prompt β€” it can lie!

♻️ Only redo the first-time steps if:

πŸ—‘οΈ you delete .venv
πŸ’» you're on a new machine
πŸ“¦ requirements.txt got new packages

πŸ”₯ Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

A Textile Mill's Dyehouse Ramp Curve: Get One Step Wrong and the Sheet Belongs to the Master

aiomniu - Oct 18

Local-First: The Browser as the Vault

Pocket Portfolio - Apr 20

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelski - Mar 19

Dashboard Operasional Armada Rental Mobil dengan Python + FastAPI

Masbadar - Mar 12

I Wrote a Script to Fix Audible's Unreadable PDF Filenames

snapsynapseverified - Apr 20
chevron_left
2Posts
1Comments
5Connections
I'm Brian, a full-stack developer based in Nairobi, Kenya, specializing in Python/Flask and JavaScri... Show more

Related Jobs

View all jobs β†’

Commenters (This Week)

8 comments
3 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!