isort

A Python utility / library to sort Python imports.

Here are some articles that you may find helpful