Jedi: Autocompletion and Static Analysis for Python
Jedi is a static analysis tool for Python, primarily used for autocompletion and goto functionality in IDEs and editor plugins. It also offers features like refactoring, code search, and finding references. The current version is 0.19.2, released on November 10, 2024. Jedi follows a regular release cadence, with updates approximately every 6-12 months.
Warnings
- breaking Deprecation of Python 2 support in version 0.16.0
- gotcha Use of deprecated 'completions' method in version 0.16.0
Install
-
pip install jedi
Imports
- Script
from jedi import Script
Quickstart
import jedi
source = '''
import json
json.lo
'''
script = jedi.Script(source, path='example.py')
completions = script.complete(3, len('json.lo'))
print(completions[0].name)