This extension will look in your codebase for import statements, and allow you to put them in the codebase easily.
Import normally, ie for vim-plug:
Plug 'dotrar/telescope-python-imports'
and load extension to your telescope setup
telescope.load_extension("python-imports")
Then bind to a key:
I prefer to use ctrl-y while in insert mode, and "fi" for normal mode.
Note if called while in insert mode, it will keep you in insert mode
local python_imports = require('telescope').extensions['python-imports']
-- example keymaps
vim.keymap.set('i', '<c-y>', python_imports.search)
vim.keymap.set('n', 'gy', python_imports.search,)