Imports should be grouped in the following order: standard lib, third party, local application. See http://www.python.org/dev/peps/pep-0008/#imports