Jedi
Static analysis library for Python powering autocompletion, goto, refactoring, and reference search across editors and IDEs
Repository Health
Technical Analysis
Jedi is a static analysis library for Python that provides autocompletion, goto/definition lookup, type inference, refactoring, and find-references functionality, meant to be embedded inside editor and IDE plugins rather than used as a standalone application. It analyzes Python source without executing it, using its own inference engine to resolve names, types, and imports.
Jedi is the autocompletion engine behind IPython’s tab completion and is used as the core library by numerous editor integrations, including jedi-vim, the Python extension for Visual Studio Code (historically), python-lsp-server, and jedi-language-server. Its author has since released a Rust-based successor project (Zuban) aimed at mypy-compatible language serving, but Jedi itself remains widely deployed and actively maintained as the analysis engine behind many existing Python tooling integrations.
What You Get
- A
Script(code).complete(line, column)API returning ranked autocompletion suggestions at a given cursor position goto()andinfer()methods for jumping to a name’s definition or inferring its type/value without executing the codeget_references()andget_signatures()for find-all-references and call-signature/parameter-hint lookups- Basic refactoring support (
jedi.api.refactor) for operations like renaming and inlining - A static-analysis mode (
test/static_analysis) capable of flagging certain classes of errors without running the code - Support for cross-version and cross-environment analysis via its own
Environment/virtualenv detection, so completions can reflect a target interpreter different from the one running Jedi
Common Use Cases
- Powering editor/IDE autocompletion plugins (jedi-vim, python-lsp-server, jedi-language-server) for Python
- Providing IPython’s and other REPLs’ interactive tab-completion
- Building custom Python tooling that needs goto-definition, find-references, or type inference without invoking a full type checker
- Implementing lightweight refactoring tools (rename, extract) driven by Jedi’s static analysis of scope and references
Under The Hood
Architecture - Jedi parses Python source into its own AST-like tree (via the sibling parso library) and runs a custom, non-executing inference engine (jedi/inference) that resolves names, attribute access, and imports by static reasoning about scopes, stub files, and (optionally) installed third-party packages; the jedi/api layer wraps this engine behind the stable Script class that editor plugins call, while jedi/plugins extends inference for specific frameworks (e.g. Django) with special-cased handling. Tech Stack - Pure Python with parso as its core parsing dependency and no other required third-party dependencies; it supports analyzing code written for different Python versions/environments than the one Jedi itself runs under via its own Environment abstraction, and is packaged with a classic setup.py/pyproject.toml combination. Code Quality - The test/ directory includes dedicated suites for completion, refactoring, static analysis, and API-level integration tests, run via pytest with CI on GitHub Actions across Python versions; the project has 6,167 GitHub stars, active recent development, and a long operating history (its isitmaintained badges track issue-resolution speed publicly in the README). API Design - The primary entry point is a single Script object constructed from source code, exposing consistently named line/column-based methods (complete, goto, infer, get_references, get_signatures) that mirror the operations an editor’s language-server implementation needs, making it straightforward to wrap Jedi behind the Language Server Protocol (as jedi-language-server and python-lsp-server do).
Used by 3 apps in this directory
argilla
AI Development · Data Engineering
Collaborate on high-quality AI training data with a self-hosted annotation platform built for LLMs, NLP, and multimodal models.
Flowfile
Data Engineering
Visual ETL that compiles to Polars — build pipelines on a canvas, export as standalone Python, and run anywhere without platform lock-in.
marimo
Developer Tools · Data Engineering
A reactive Python notebook that eliminates hidden state, runs reproducibly, and deploys as a web app or script — stored as pure Python, built for the AI era.