Start a Python project you can verify
Problem
A script works once, but its environment and failure behavior are not reproducible.
Full playbook — best for, checklist, verification, sources
Best for
A first project, a small script that needs hardening, or a clean-room verification pass.
Not for
A full Python syntax course or a separate beginner project template; this path deliberately reuses the published agent-loop example.
FlyPython decision and trade-off
Reuse one shared, tested artifact before inventing a new sample. You gain a real failure suite, but the example uses agent terminology that beginners may need to look up.
Checklist
- Create an empty project directory and a virtual environment with Python 3.12 or newer.
- Record the supported Python version and the command that runs the checks.
- Download the published agent-loop source and its 13-test suite from the guide.
- Run python3 -m unittest -v from the example directory and keep the pass or failure output.
- Write one input rule, one output rule, and one invalid-input test for your next function.
Supported environment
Python 3.12 or newer with the standard library. The shared suite was last run with Python 3.14.7 on macOS; after the two example files are downloaded, the test run needs no network or package install.
Verification
Code checkRun the shared 13-test agent-loop suite. This is the same suite used by the AI agents playbook, not an independent foundation example.
python3 -B -m unittest -vLast reviewed · verification recorded
Next stepOpen the guide, create the environment, run the shared suite, then apply the same contract pattern to one function of your own.