Using the PyCharm & IntelliJ plugin
PyCharm and IntelliJ use the same plugin. From here on, we'll refer to both editors as just “PyCharm”. In this article, you'll learn how to access all the features the PyCharm plugin has to offer.
The only prerequisites are that you have Kite Engine running and the PyCharm plugin installed. If you don't have the PyCharm plugin installed, you can learn how to do so here.
Note: If you installed the PyCharm plugin while PyCharm was already running, you'll need to restart PyCharm for the plugin to activate.
Checking the status of Kite
If Kite is installed properly, you should see a small Kite logo at the bottom right corner of the PyCharm window. Hovering your mouse over this icon will tell you the current status of Kite.
There are a handful of possible states Kite can be in, as described in the following table:
|Kite: Not Installed||Kite Engine is not installed.|
|Kite: Not running||Kite Engine is not running.|
|Kite: Not logged in||Kite Engine is running, but you need to log in.|
|Kite: Indexing||The Kite Engine is analyzing your code.|
|Kite: Ready||Kite is ready to go - start coding!|
|Kite: Ready||Kite is ready but inactive for your current file. This may be because the programming language is unsupported or because the file is not whitelisted.|
Note: If you're running Kite for the first time, it may take several minutes for Kite to finish syncing and indexing your codebase.
Clicking on the icon will open a menu that will allow you to access your settings or get information about your account.
Writing code and accessing features
In the following sections, the
$ character indicates the position of your editor's text cursor.
To start, open a Python file in a whitelisted directory. Make sure that this file has been saved with a
.py extension. Now type the following code:
A list of suggested completions should automatically appear.
Kite can provide completions for Python keywords, name expressions or attribute expressions. The example above illustrates a name expression completion. An example of an attribute completion would be:
import json json.d$
In the case of name and attribute completions, Kite will also provide the type of value represented by the completion e.g.
Continuing with the example code above, complete the function call to by typing the opening parentheses.
import json json.dumps($
Kite should show you information about how to call
The top half of the UI shows the arguments that the function accepts. Arguments with default values will also have their default values shown. You may also click on the
**kw link to show the arguments that are found in the keyword arguments dictionary.
As you type, Kite will stay in-sync with your cursor and highlight which argument you are currently focused on.
The “How others used this” section in the bottom half of the UI shows you common ways other programmers use the function
json.dumps. Kite learns these calling patterns by analyzing all the open source code available on GitHub and then ranks them from most popular to least popular. If you are calling a function that you have defined locally, Kite will extract patterns from your codebase directly instead of GitHub.
Kite can also quickly retrieve documentation for the code you are working with. If you hover your mouse over an identifier, you can click on the “More” link to open the documentation in the Copilot. Clicking on the “Web” link in this case would open the same documentation in your browser.
Note: If you don't see this UI after hovering your mouse over an identifier, you may need to enable quick documentation under Preferences → Editor → General
You may also select the
Kite: Docs at Cursor action from the action navigator.
When triggered, the documentation shows up in the Copilot.
Jump to definition
You can also jump to the definition of a module, class or function from your local codebase using Kite. The hover UI provides a “Def” link to do so.