Skip to main content

fastapi-lsp

CI Release

Language server for FastAPI and Starlette — routes, Depends() graph, url_for, Jinja templates, env/settings. One Rust binary, any LSP-capable editor. Static analysis only.

Features

Diagnostics param mismatches, shadowed routes, unincluded routers, Depends(fn()), dep cycles, broken url_for, missing templates, undefined env keys
Navigation test call → handler, Depends() chains both ways, template files, .env lines
Hover route card: resolved path, router chain, response model, deps, middleware
Completions route paths, url_for names, template paths, env keys
Symbols GET /api/books/{book_id} in the symbol picker
Code lenses test count, dep usage, override count per handler
check CLI same diagnostics as a linter — fastapi-lsp check .

Installation

uv tool install fastapi-lsp

Or with pip:

pip install fastapi-lsp

Or download a pre-built binary from the releases page.

Editor setup

Neovim

vim.lsp.config('fastapi_lsp', {
  cmd = { 'fastapi-lsp', '--stdio' },
  filetypes = { 'python', 'html', 'htmldjango' },
  root_markers = { 'pyproject.toml', '.git' },
})
vim.lsp.enable('fastapi_lsp')

Helix

# ~/.config/helix/languages.toml
[language-server.fastapi-lsp]
command = "fastapi-lsp"
args = ["--stdio"]

[[language]]
name = "python"
language-servers = ["pyright", "fastapi-lsp"]

[[language]]
name = "html"
language-servers = ["vscode-html-language-server", "fastapi-lsp"]

[[language]]
name = "jinja"
language-servers = ["fastapi-lsp"]

Zed

Install from the Zed extensions panel (Cmd+Shift+X) — search for fastapi-lsp and click Install. It activates automatically for Python, HTML, and Jinja2 files.

To control server order alongside other language servers or pass initialization options, add to ~/.config/zed/settings.json:

{
  "languages": { "Python": { "language_servers": ["fastapi-lsp", "..."] } },
  "lsp": { "fastapi-lsp": { "initialization_options": { "templates": ["app/templates"] } } }
}

Configuration

Zero config for standard projects. Priority: InitializationOptions › fastapi-lsp.toml › [tool.fastapi-lsp] in pyproject.toml.

Option Default
entrypoint (auto-detected) main app file
templates [] Jinja template directories
source_roots [] extra import resolution roots
env_files [".env", ".env.example"] env key definitions
settings_env_files [".env", ".env.example", ".env.unittest"] env files checked for BaseSettings coverage
process_env false include server process env
process_env_show_values false show process-env values in hover
client_fixtures ["client", "async_client"] pytest HTTP client fixture names
env.ignore [] env keys to suppress from diagnostics

Feature toggles — all true by default except test_unknown_paths:

Toggle Default
diagnostics true
completion true
hover true
navigation true
code_actions true
code_lens true
symbols true
inlay_hints true
document_links true
test_unknown_paths false
# fastapi-lsp.toml
entrypoint = "app/main.py"
templates = ["app/templates"]

[features]
code_lens = false

[check]
only = []
ignore = ["env/undefined-key"]

CLI

fastapi-lsp lsp [--stdio | --tcp --address 127.0.0.1 --port 9257]
fastapi-lsp check PATH [--only CODES] [--ignore CODES] [--format text|json] [--fix]
fastapi-lsp routes [PATH] [--format text|json]

Development

cargo build
cargo test
uv run --group dev pytest e2e/ -v

License

MIT

Metadata

Release files for fastapi-lsp 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for fastapi-lsp 0.1.8
File Actions
fastapi_lsp-0.1.8-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for fastapi_lsp-0.1.8-py3-none-win_amd64.whl
fastapi_lsp-0.1.8-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for fastapi_lsp-0.1.8-py3-none-manylinux_2_28_x86_64.whl
fastapi_lsp-0.1.8-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for fastapi_lsp-0.1.8-py3-none-manylinux_2_28_aarch64.whl
fastapi_lsp-0.1.8-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for fastapi_lsp-0.1.8-py3-none-macosx_11_0_arm64.whl
fastapi_lsp-0.1.8-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for fastapi_lsp-0.1.8-py3-none-macosx_10_12_x86_64.whl

Total release size: 12.3 MB

Release files / fastapi_lsp-0.1.8-py3-none-win_amd64.whl

Download URL fastapi_lsp-0.1.8-py3-none-win_amd64.whl
Size 2.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
44ca5e7e3c54cbeb384d30119f24ec05792fdd6db27c42d2936b12f5852652af
BLAKE2b-256 checksum
How to use checksums
23244ec9cbd3469855fe8edc9bf3cc04646bff1ecf4fee891b81096ec106f2e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fastapi_lsp-0.1.8-py3-none-manylinux_2_28_x86_64.whl

Download URL fastapi_lsp-0.1.8-py3-none-manylinux_2_28_x86_64.whl
Size 2.5 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
544ab644026844896c32cdaf7203adcad53aa99caaca63cc788b06f2576cf90d
BLAKE2b-256 checksum
How to use checksums
66f405dd00a0ecd62a140205c43826869616b017696b5c764a7fb30eb7ad6e47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fastapi_lsp-0.1.8-py3-none-manylinux_2_28_aarch64.whl

Download URL fastapi_lsp-0.1.8-py3-none-manylinux_2_28_aarch64.whl
Size 2.4 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
1f34bfc312272763df545294fbce163ba7e366e05d5c8feaf4d158a8618cda00
BLAKE2b-256 checksum
How to use checksums
31688c8032a315f526752b3c369fb856f718090b04a5a9504c9d871a4ee3f59f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fastapi_lsp-0.1.8-py3-none-macosx_11_0_arm64.whl

Download URL fastapi_lsp-0.1.8-py3-none-macosx_11_0_arm64.whl
Size 2.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cf179aed22030c25c90d90786a0ade13741a9961a2bc98e352879b0277aa47b1
BLAKE2b-256 checksum
How to use checksums
73916523d890040486b4e70f1ae148447652c213e6ed44876ac7d26afa6ce9f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fastapi_lsp-0.1.8-py3-none-macosx_10_12_x86_64.whl

Download URL fastapi_lsp-0.1.8-py3-none-macosx_10_12_x86_64.whl
Size 2.4 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
965940e3916398e7e2bfad602d4ef3b25a40d0df3869270d916516781f9958f3
BLAKE2b-256 checksum
How to use checksums
99e733eed4f8e8345cb6cbacedb2b6edff828eaab91827145a416f26ca3b5d80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fastapi-lsp 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page