The Metrics Team uses [https://www.python.org/dev/peps/pep-0008/ PEP8] for its Python projects unless there's a reason to do otherwise.
= Tools
Suggested tools are...
* [https://pypi.python.org/pypi/pyflakes pyflakes] - Static analysis checker. `pylint` can be useful too but pyflakes is more easily integrated into your test suite.
* [https://pypi.python.org/pypi/pycodestyle pycodestyle] - Previously called `pep8`, this is a highly configurable style checker that by default validates compliance with the PEP8 specification.
Stem provides [https://stem.torproject.org/api/util/test_tools.html testing functions] to make integrating with both of these easy.