# Zuban: Mypy-Compatible Python Type Checker


Zuban is a static type checker and language server for Python, written in Rust by David Halter, author of [Jedi](https://github.com/davidhalter/jedi) (the longstanding Python autocompletion library) and [parso](https://github.com/davidhalter/parso). It runs in two modes: `zuban mypy` (aliased as `zmypy`) behaves as a mypy-compatible drop-in, and `zuban check` applies a pyright-style inference strategy.

Zuban launched as open source under AGPL-3.0 in September 2025, with a paid commercial license available for organizations that cannot accept AGPL's source-disclosure requirements. That licensing split is what most distinguishes Zuban from its competitors: it funds full-time development in a way that MIT-licensed alternatives cannot, but it also rules Zuban out for many proprietary codebases unless the team buys a commercial license.

## When to use Zuban

Zuban fits teams already running [mypy](https://pydevtools.com/handbook/reference/mypy.md) who want the same semantics and error messages at a fraction of the runtime cost. The `zmypy` mode reads `mypy.ini`, `setup.cfg`, and `[tool.mypy]` in `pyproject.toml` unchanged, so a CI step can be swapped one command at a time. Teams that value typing spec conformance over raw speed may also consider Zuban over [ty](https://pydevtools.com/handbook/reference/ty.md) and [Pyrefly](https://pydevtools.com/handbook/reference/pyrefly.md), which trade conformance for other design goals.

Zuban is a poor fit for closed-source commercial work that cannot absorb AGPL-3.0 obligations and will not buy a commercial license. It is also still early: the LSP covers the common features but lags [ty](https://pydevtools.com/handbook/reference/ty.md) and [Pyrefly](https://pydevtools.com/handbook/reference/pyrefly.md) on editor polish. For a broader comparison of all five major type checkers, see [How do Python type checkers compare?](https://pydevtools.com/handbook/explanation/how-do-mypy-pyright-and-ty-compare.md).

## Key Features

- Two modes: `zuban mypy` (or the shorter `zmypy`) behaves like mypy, including config and error messages. `zuban check` runs a pyright-compatible inference strategy that analyzes unannotated code.
- Performance: the project benchmarks 20-200x faster than mypy on comparable workloads, using roughly half the memory of ty and Pyrefly.
- mypy test-suite compatibility: passes over 95% of mypy's own relevant test suite, which is the highest mypy-compatibility score among the new Rust-based checkers.
- Typing spec conformance: scores 96.4% (134/139 files) on the official [typing conformance suite](https://github.com/python/typing/tree/main/conformance) as of March 2026, second only to pyright (97.8%).
- Language server: `zuban server` provides diagnostics, completions, go-to-definition, find references, rename, hover, and document highlights over LSP.
- Parser lineage: shares design and contributors with [Jedi](https://github.com/davidhalter/jedi), which has shipped autocompletion for Python for over a decade.

## Configuration

In `zmypy` mode, Zuban reads mypy's configuration verbatim from `mypy.ini`, `.mypy.ini`, `setup.cfg`, or `pyproject.toml` under `[tool.mypy]`:

```toml {filename="pyproject.toml"}
[tool.mypy]
python_version = "3.12"
strict = true
warn_unused_ignores = true
```

In `zuban check` mode, Zuban reads its own `[tool.zuban]` table:

```toml {filename="pyproject.toml"}
[tool.zuban]
python-version = "3.12"
```

## Installation and Usage

```bash
# Install with uv
uv add --dev zuban

# Or run without installing
uvx zuban check src/

# Mypy-compatible mode (reads mypy config)
uv run zmypy src/

# pyright-style mode
uv run zuban check src/

# Start the LSP server for editor integration
uv run zuban server
```

Zuban is also published on [PyPI](https://pypi.org/project/zuban/) and ships pre-built wheels for macOS, Linux, and Windows on both x86_64 and ARM64.

## Editor Integration

Zuban's LSP is usable from any editor that supports the protocol. The project documents configurations for VS Code, Neovim, and Zed; Emacs and Helix work through standard LSP clients. Point the client at the `zuban server` command to start.

Positron (the Posit data-science IDE) evaluated Zuban as a candidate default language server in March 2026 but selected [Pyrefly](https://pydevtools.com/handbook/reference/pyrefly.md) instead, citing Zuban's smaller LSP feature surface and earlier maturity stage.

## Pros

- Order-of-magnitude speedup over mypy while preserving mypy's config, diagnostics, and error codes
- Second-highest typing spec conformance of any open-source Python type checker (behind only pyright)
- Shares parser and design heritage with Jedi, giving it a mature foundation for LSP features
- Half the memory footprint of ty and Pyrefly on comparable workloads
- Single Rust binary with no Node.js or Python runtime dependency

## Cons

- AGPL-3.0 license creates obligations that many proprietary projects cannot accept without a commercial license
- LSP feature surface is narrower than ty or Pyrefly; some editor features (for example, inlay hints) are not yet implemented
- Maintained largely by one person, which makes bus-factor a real consideration for teams adopting it at scale
- Smaller community and fewer third-party integrations than mypy, pyright, or ty
- Conformance numbers above 95% are self-reported and still settling as the project matures

## Comparison to Other Tools

Zuban's closest peer is [mypy](https://pydevtools.com/handbook/reference/mypy.md). The two share configuration, diagnostics, and error codes; Zuban is an order of magnitude faster and written in a more maintainable codebase. Against [ty](https://pydevtools.com/handbook/reference/ty.md) and [Pyrefly](https://pydevtools.com/handbook/reference/pyrefly.md), Zuban has higher typing-spec conformance and a lighter memory footprint but narrower LSP features and tighter licensing constraints. Against [pyright](https://pydevtools.com/handbook/reference/pyright.md), Zuban matches conformance closely and ships a faster, self-contained binary but lacks pyright's Microsoft-backed editor ecosystem.

{{< callout type="warning" >}}
Zuban is in active development. Performance numbers and conformance scores are self-reported and shifting as the project matures. Verify claims against the current release before depending on them for a migration decision.
{{< /callout >}}

## Learn More

- [How do Python type checkers compare?](https://pydevtools.com/handbook/explanation/how-do-mypy-pyright-and-ty-compare.md)
- [Zuban documentation](https://docs.zubanls.com/)
- [Zuban GitHub repository](https://github.com/zubanls/zuban)
- [Zuban on PyPI](https://pypi.org/project/zuban/)
- [Jedi GitHub repository](https://github.com/davidhalter/jedi)
- [mypy](https://pydevtools.com/handbook/reference/mypy.md) reference
- [ty](https://pydevtools.com/handbook/reference/ty.md) reference
- [Pyrefly](https://pydevtools.com/handbook/reference/pyrefly.md) reference
- [pyright](https://pydevtools.com/handbook/reference/pyright.md) reference
