My attempt at porting blog.php over to Python.