O'Reilly logo

Python 3 Web Development Beginner's Guide by Michel Anders

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action implementing the task module

Have a look at the Python code in task.py:

Chapter3/task.py

import cherrypy
import json
import os
import os.path
import glob
from configparser import RawConfigParser as configparser
from uuid import uuid4 as uuid
from datetime import date
import logon

This first part illustrates Python's "batteries included" philosophy nicely: besides the cherrypy module and our own logon module, we need quite a bit of specific functionality. For example, to generate unique identifiers, we use the uuid module and to manipulate dates, we use the datetime module. All of this functionality is already bundled with Python, saving us an enormous amount of development time. The next part is the definition of the basic HTML ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required