Week 5 of 16

Week 5 Review & Milestone Check

Reflect on what you built, verify you have the four core skills, and get a look at what's coming in Week 6 — your first web app.

Day 25 45 minutes Review

Day 25 of 80

What You Built This Week

Step back and look at the distance covered. On Monday you watched videos about functions and virtual environments. By Thursday you had added timestamp-based history logging to a multi-file project without touching any code that was already working. That's a full week's progression — from theory to a feature deployed in a real project.

Week 5 Accomplishments

Milestone Check

By the end of Week 5, you should be able to do these four things independently — without looking anything up. Read each one carefully and be honest with yourself.

Four Skills to Confirm
  1. Write your own functions with parameters, return values, and defaults. Without help: define a function that takes at least two parameters, uses one default, and returns a value. Call it with different arguments and use the return value.
  2. Split code across multiple files and import between them. Without help: create two .py files, define a function in one, and import + call it from the other using from filename import function_name.
  3. Set up a virtual environment and requirements.txt. Without help: create a new project folder, run python -m venv venv, activate it, create a requirements.txt, and install from it with pip install -r requirements.txt.
  4. Add a feature to an existing project without breaking what's already there. Without help: identify where to add new functions, where to add the import, where to call the new code — and make a mental plan before touching anything.

If any of these feel shaky: go back to Day 22 (Jupyter) or Day 23 (build) and redo the relevant section. It takes 20 minutes and locks the concept in permanently.

Look at Your Project Structure

Open your prompt-vault/ folder in VS Code and look at it with fresh eyes. This is what a real Python project looks like:

prompt-vault/ — current state
prompt-vault/
  .env                ← ANTHROPIC_API_KEY — never commit this file
  requirements.txt    ← pip install -r requirements.txt sets up anyone's machine
  prompts.json        ← your saved prompts, human-readable JSON
  history.json        ← timestamped log of every generation
  helpers.py          ← data functions: load, save, validate, log, show history
  vault.py            ← interaction: menus, API calls, flow control
  venv/               ← the virtual environment — don't commit this folder either
What Each File Is Responsible For

What's Coming in Week 6: Flask

Next week you turn this command-line tool into a web application — running in a browser, with a real interface. This is not a small thing. But here's what makes it possible: you've already done most of the work.

Why Week 6 Is Less Scary Than It Sounds
A Sneak Peek at Week 6's Structure

Your Week 6 project will add one new file: app.py. It imports Flask and your helpers. It defines URL routes — / for the main page, /generate for the API call, /history for the log view. The HTML templates you write will look almost identical to the HTML you already know. By Day 28 or 29, you'll be running your vault in a browser.

Optional: Go Deeper

If you have time today and want to explore further, here are three directions that build on this week's work:

Explore pathlib for File Paths

Your current code uses plain strings for filenames: "prompts.json". Python's pathlib module gives you a smarter way: Path("prompts.json"). It handles cross-platform path differences automatically and makes it easy to check if a file exists before opening it. Try replacing your file handling in helpers.py with pathlib.Path objects.

from pathlib import Path
PROMPTS_FILE = Path("prompts.json")
# Path objects work with open() just like strings
# Plus: PROMPTS_FILE.exists() instead of try/except FileNotFoundError
Try argparse for Command-Line Flags

Right now vault.py is always interactive — it shows a menu and waits for input. With argparse, you could run python vault.py --history to dump history directly without going through the menu, or python vault.py --generate "drone shot" to skip the interactive prompt entirely. This is a preview of Week 15's Typer module, which does the same thing with less code.

Add a .gitignore

If you plan to put this project on GitHub, create a .gitignore file in your project root. It tells git which files to ignore. For a Python project you always want to exclude .env and venv/:

.env
venv/
__pycache__/
*.pyc

End of Day Checklist

Next — Week 6: Flask Web App

Monday starts with Corey Schafer's Flask series — three videos, about 90 minutes of some of the best Python tutorial content available. By the end of the week, your Prompt Vault will be a real web application running at http://localhost:5000. Everything you built this week comes with you.