How I organize Python code

I live and die by PEP-8.

[imports] (import, then from ... import ...) standard library third-party libraries application [static globals] LOG (logging) Constants [exceptions] class XException(Exception): """Documentation...""" [functions with no shared state] [classes (used to encapsulate shared state)] [initializers]

pep8 is my lint.