Generate Imports While Typing

Avoid interruption by letting PyCharm generate your imports as you type.

This is the right way to do imports.

As you are typing a symbol, you have to both finish typing the symbol -- and without a typo -- and you have to import it. For the import, you have to stop what you're doing, scroll up, enter the import in the correctly-sorted PEP8 way, etc.

Let PyCharm do all of that. While typing, press ⌃␣ (macOS) / Ctrl+Space (Windows/Linux) to tell PyCharm to autocomplete on symbols from modules. When you select the completion target, PyCharm will also generate the import -- in the right place, merging it with an existing import if needed.

Related Resources

Optimize Imports
Automate the organizing and cleaning up of your Python imports with Optimize Imports.
Remote Development in PyCharm Professional Using Google Cloud Code
Leverage Cloud Code and PyCharm to enhance and optimize your developer productivity.
Google Kubernetes Engine
Harnessing the Power of Google Kubernetes Engine