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
Optimize Imports
Automate the organizing and cleaning up of your Python imports with optimize imports.
Navigation Bar - All the power!
Navigation Bar - All the power!
The Navigation Bar can do much more than you think!
Clean Up Messy Imports With Optimize Imports
Clean Up Messy Imports With Optimize Imports
Quickly remove any unused imports and more.