Web Development

Build web apps and services with tested examples: HTTP, REST APIs, servers, routing, and templating across the Python and Groovy tutorials.

Python: Unit Testing with pytest, Fixtures, Parametrize

Python pytest from scratch: see how test discovery works, write fixtures for reusable setup, parametrize one test across many inputs, use markers to organize a suite, and measure code coverage with pytest-cov. Every example below was run on real pytest, so the output you see is the output you get. “Code without tests is broken by design.” Jacob Kaplan-Moss You change one line of code, the app still seems to run, and three days later a user reports that something ... Read More

Python Test Driven Development: Red-Green-Refactor Workflow

Python TDD, short for test driven development, means you write the test before the code. You watch the test fail, write just enough code to make it pass, then clean up. This post teaches the Red-Green-Refactor cycle by building a real password validator one tiny step at a time, so you feel the rhythm instead of just reading about it. “Make it work, make it right, make it fast, in that order.” Kent Beck, TDD By Example Last Updated: July ... Read More

Python: Decorators Deep Dive, Writing & Real-World Patterns

Python decorators explained from the ground up: how the @ symbol wraps and replaces your function, how to write decorators that take arguments, why you always reach for functools.wraps, and the real-world patterns you will actually use, like timing, retry, and caching. “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” Martin Fowler, Refactoring Last Updated: July 2026 | Tested on: Python 3.14.6 | Difficulty: Intermediate | Reading Time: 17 minutes ... Read More