Jedi: Autocompletion and Static Analysis for Python

0.19.2 · active · verified Sat Mar 28

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

Install

Imports

Quickstart

A simple example demonstrating Jedi's autocompletion feature.

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)

view raw JSON →