python-projects

Production-ready Python mini-projects

A curated collection of Python projects showcasing test-driven development, GUI design with Tkinter, service integrations, and classic design patterns. Built for reliability and maintainability with modern tooling (pytest, ruff, black, mypy, GitHub Actions).

Headshot of Brennan Brown

Quickstart

  1. Clone the repository:
    git clone https://github.com/brennanbrown/python-projects.git
    cd python-projects
  2. Create a virtual environment and install dependencies:
    python3 -m venv .venv
    source .venv/bin/activate  # Windows: .venv\\Scripts\\activate
    pip install -r requirements.txt
    pip install -r requirements-dev.txt
  3. Run tests to verify everything is green:
    pytest -q
Python 3.11/3.12+ recommended. Linting and tests run via GitHub Actions.

Projects

GUI Weather App (Tkinter)

Cross-platform Tkinter GUI that fetches live weather data from NOAA/NWS and OpenWeatherMap. Robust timeouts, HTTPS, user-agent headers, and a clean service layer.

Path: src/gui-weather/
How to run
  1. Set your OpenWeatherMap API key (optional but recommended):
    export OWM_API_KEY=<your_api_key>  # Windows: set OWM_API_KEY=<your_api_key>
  2. Launch the app:
    python src/gui-weather/weather_app.py

Schedule Service

Generates a simple HTML weather report and demonstrates basic scheduling and email sending. Focuses on job orchestration and reporting.

Path: src/schedule-service/
How to run
  1. Create a weather report HTML file:
    python src/schedule-service/create_html.py
  2. (Optional) Try the scheduler demo:
    python src/schedule-service/task_scheduler.py

TDD Examples

Small, focused exercises demonstrating unit testing, fixtures, monkeypatching, and mocking with pytest and unittest.mock.

Path: src/tdd/
How to run
  1. Run the test suite:
    pytest -q

Design Patterns: Maze

Demonstrates design principles through a maze implementation. Useful for discussing architecture and extensibility in interviews.

Path: src/design-patterns/
How to run
  1. Run the module (if present) or explore classes in an interactive shell:
    python -m src.design-patterns.maze  # if a __main__ is provided

Breakpoint & OOP Examples

Small scripts for debugging and OOP demonstration. Useful to show workflow when stepping through code and reasoning about class design.

Paths: src/breakpoints/, src/example_oop.py
How to run
  1. Run scripts directly:
    python src/breakpoints/breakpoint_inheritance.py
    python src/breakpoints/breakpoint_two_classes.py
    python src/example_oop.py

Tooling & Quality