Using the Spyder plugin
In this article, you'll learn how to access all the features in Kite for Spyder (4.0 and later). Kite is an AI-powered completions engine that runs entirely locally on your machine.
Please note that Kite is available only in Spyder 4.0 and later. It's easiest to install Spyder 4 via Anaconda. Alternatively, please refer to Spyder's Github repo for alternative installation instructions.
Once Spyder 4 is installed, you can then enable Kite and download the Kite Copilot app that runs the AI-powered Kite Engine if you haven't already.
The only prerequisites are that you have Kite Engine running and have chosen Kite as your Spyder completions provider. Here are steps to do so:
- Install and run Kite at https://kite.com/download/
- Enable completions at Preferences > Completions and linting > Completion. Make sure all checkboxes here are checked. For optimal experience, we recommend changing the values here to the ones in the screenshot below.
- Show automatic completions after characters entered: 1
- Show automatic completions after keyboard idle (ms): 100
These 2 settings will allow Kite's completions to assist you more frequently and more quickly.
- Check the checkbox at Preferences > Completions and linting > Advanced > Enable Kite (if the Kite engine is running)
Checking the status of Kite
If Kite is installed properly, you should see a text indicator at the bottom of the Spyder window.
There are a handful of possible states Kite can be in, as described in the following table:
|Kite: not running||Kite Engine is not running.|
|Kite: Indexing||Kite is analyzing your code.|
|Kite: Ready||Kite is ready to go - start coding!|
Note: If you're running Kite for the first time, it may take several minutes for Kite to finish indexing your codebase.
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. 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, functions, and even snippets. Here, Kite recognizes that data scientists often use the
np alias to represent
numpy, and saves you keystrokes. The example above illustrates a name expression completion. An example of a function completions would be:
import numpy as np np.l‸
Kite will also show hints for the kind of value represented by the completion (e.g.
function) as well as a short snippet of the documentation if available.
Kite is much more than just a completions engine. The Kite Copilot includes look up information while you code, saving you time and distractions from a typical browser search. In the GIF below, Kite follows your cursor to automatically show you relevant documentation, such as your library imports. Learn more about the Kite Copilot and its functionality.
To get the functionality above, enable "Click for docs to follow cursor" in the top right corner of the Kite Copilot.