This is a simple, lightweight math captcha, effective at filtering most online trawling bots. It is not meant to protect against targeted attacks. For that, you should consider using Google's reCAPTCHA, or similar technologies.
See requirements.txt for Python library requirements.
Running example/example.py will generate a webpage looking something like the following.