The python style guide suggests to group imports like this:
Imports should be grouped in the following order:
- standard library imp
According to the CIA's internal coding conventions (part of the WikiLeaks Vault 7 leak), python imports should be grouped into three groups:
Imports should be ordered lexicographically within these groups, ignoring case:
import foo
from foo import bar
from foo.bar import baz
from foo.bar import Quux
from Foob import ar