Skip to content

Module 20 · Building Real Python Applications — topic 13 of 13

Preparing projects for demonstration

Getting a project ready to show: a clear README, sample data and a demo script, pre-demo checks and smoke tests, cleaning up the repository, and presenting what the project does, how it is built and what you learned.

Beginner 10 min read·Lesson 306 of 306 in Python Programming

Learning objectives

  • Write a README that gets someone running quickly
  • Create a repeatable demo with sample data and pre-demo checks
  • Present a project clearly

Definition

Preparing a project for demonstration means making it easy for others to understand, install and see working: documentation, sample data, reliable start-up, a rehearsed walkthrough and a tidy repository.

Introduction

A great project that won't start on someone else's laptop, or that nobody can understand, makes no impression. A little preparation makes the work shine.

Why it matters

Portfolios, interviews, assignments and open-source contributions are all judged by how quickly others can see and understand your project.

Detailed explanation

The README should answer: what is this, why does it exist, how do I install it, how do I run it, and what does it look like (example commands and output).

List requirements precisely (Python version, requirements.txt) and give copy-paste installation commands.

Provide sample data or a seed command so the demo shows meaningful results immediately.

Write a demo script or a list of commands that shows the main features in a minute or two, with predictable output.

Run pre-demo checks: correct Python version, dependencies installed, data files present, and a smoke test of the main flow.

Clean the repository: remove secrets, personal data, large generated files and debugging leftovers; add a .gitignore and a licence.

Present in three parts: the problem and a live demo, how it is built (architecture, interesting code), and what you learned or would do next.

Be honest about limitations and known issues — it builds trust and shows engineering judgement.

Syntax

Markdown
# Expense Tracker
A command-line app for recording daily expenses and viewing monthly reports.
## Requirements
Python 3.12+
## Setup
python -m venv .venv
.venv\Scripts\activate # macOS/Linux: source .venv/bin/activate
python -m pip install -r requirements.txt
## Run
python -m tracker
## Example
> add 250 food lunch
added food 250.00
  • What, why, install, run, example.
  • Sample data and a demo script.
  • Pre-demo checks.

Code examples

A README outline

Markdown
# Expense Tracker
Record daily expenses from the command line and see where your money goes.
## Features
- add, list and delete expenses
- monthly and category reports
- data saved automatically to expenses.json
## Getting started
1. python -m venv .venv
2. Activate it and run: python -m pip install -r requirements.txt
3. python -m tracker
## Known limitations
- single user only
- no cloud backup

A predictable demo

Python
def demo():
expenses = [(250, "food"), (40, "travel"), (120, "food"), (900, "rent")]
totals = {}
for amount, category in expenses:
totals[category] = totals.get(category, 0) + amount
print("Demo: monthly expense summary")
for category, total in sorted(totals.items(), key=lambda kv: -kv[1]):
print(f" {category:<7}{total:>6}")
print(f" {'total':<7}{sum(totals.values()):>6}")
demo()
Output
Demo: monthly expense summary
  rent      900
  food      370
  travel     40
  total    1310

More examples

Pre-demo checks

Python
import importlib.util
import json
import sys
import tempfile
from pathlib import Path
def check_python(minimum=(3, 10)):
return sys.version_info >= minimum
def missing_modules(names):
return [n for n in names if importlib.util.find_spec(n) is None]
def smoke_test():
with tempfile.TemporaryDirectory() as tmp:
path = Path(tmp) / "smoke.json"
path.write_text(json.dumps({"ok": True}), encoding="utf-8")
return json.loads(path.read_text(encoding="utf-8"))["ok"]
results = {
"python >= 3.10": check_python(),
"required modules present": not missing_modules(["json", "csv", "sqlite3"]),
"save/load works": smoke_test(),
}
for name, passed in results.items():
print(f"[{'PASS' if passed else 'FAIL'}] {name}")
print("ready to demo" if all(results.values()) else "fix the failures first")
Output
[PASS] python >= 3.10
[PASS] required modules present
[PASS] save/load works
ready to demo

Step-by-step explanation

  • Each check returns True or False and has a readable name.
  • The smoke test exercises saving and loading in a temporary folder, so it never touches real data.
  • Running this before a demo catches environment problems while there is still time to fix them.

Expected output

Running “Pre-demo checks” prints exactly:

TextOutput
[PASS] python >= 3.10
[PASS] required modules present
[PASS] save/load works
ready to demo

Practical applications

  • Portfolio projects on GitHub with clear READMEs and screenshots.
  • Hackathon demos and project viva presentations.

Best practices

  • Write a README with setup and examples.
  • Prepare sample data and a demo script.
  • Run pre-demo checks and clean the repository.

Common mistakes

Committing secrets

Avoid

API_KEY = "sk-live-..." # in config.py, pushed to GitHub

Prefer

Read keys from environment variables and add .env to .gitignore.

Published secrets must be revoked; they can be found by anyone.

A demo that depends on luck

Avoid

# type commands live and hope the data looks interesting

Prefer

# use sample data and a rehearsed script

Prepared demos show the features reliably.

Important notes

  • This completes the Python course. The projects section puts every module into practice with complete applications.

Key takeaways

  • README: what, why, install, run, example.
  • Sample data, demo script and pre-demo checks.
  • Present the problem, the build and the learning.

Try it yourself

  1. 1
    Write a README for one of your projects following the outline in this lesson.
  2. 2
    Create a pre-demo check script for your project and run it.

Finished reading? Mark it complete to update your dashboard.

Suggested practice

8 questions cover the “Building Real Python Applications” module. Answers and explanations are revealed after you submit.

  • AdvancedWhat does MVP stand for when planning an application?
  • AdvancedWhere should input validation ideally happen?
  • AdvancedWhat is printed?
Practise this module