From 29c9f2a2679ee99a208ba629f03689385d86e090 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Thu, 26 Feb 2026 13:30:13 -0800 Subject: [PATCH] Add documentation for the FastAPI VS Code extension --- docs/en/docs/editor-support.md | 23 +++++++++++++++++++++++ docs/en/docs/tutorial/index.md | 7 +++++++ docs/en/mkdocs.yml | 1 + 3 files changed, 31 insertions(+) create mode 100644 docs/en/docs/editor-support.md diff --git a/docs/en/docs/editor-support.md b/docs/en/docs/editor-support.md new file mode 100644 index 0000000000..0b31f3daaf --- /dev/null +++ b/docs/en/docs/editor-support.md @@ -0,0 +1,23 @@ +# Editor Support { #editor-support } + +The official [**FastAPI extension**](https://marketplace.visualstudio.com/items?itemName=FastAPILabs.fastapi-vscode) enhances your FastAPI development workflow with route discovery, navigation, as well as FastAPI Cloud deployment, and live log streaming. + +For more details about the extension, refer to the README on the [GitHub repository](https://github.com/fastapi/fastapi-vscode). + +## Setup and Installation + +The FastAPI extension is available for both [VS Code](https://code.visualstudio.com/) and [Cursor](https://www.cursor.com/). It can be installed directly from the Extensions panel in each editor by searching for "FastAPI" and selecting the extension published by FastAPI Labs. The extension also works in browser-based editors such as [vscode.dev](https://vscode.dev) and [github.dev](https://github.dev). + +### Application Discovery + +By default, the extension will automatically discover FastAPI applications in your workspace by scanning for files that instantiate `FastAPI()`. If auto-detection doesn't work for your project structure, you can specify an entrypoint via `[tool.fastapi]` in `pyproject.toml` or the `fastapi.entryPoint` VS Code setting using module notation (e.g. `myapp.main:app`). + +## Features + +- **Path Operation Explorer** — A sidebar tree view of all routes in your application; click to jump to any route or router definition. +- **Route Search** — Search routes by path, method, or name with `Ctrl+Shift+E` (`Cmd+Shift+E` on Mac). +- **CodeLens Navigation** — Clickable links above test client calls (e.g. `client.get('/items')`) that jump to the matching route for quick navigation between tests and implementation. +- **Deploy to FastAPI Cloud** — One-click deployment of your app to FastAPI Cloud. +- **Stream Application Logs** — Real-time log streaming from your FastAPI Cloud-deployed application with level filtering and text search. + +If you'd like to familiarize yourself with the extension's features, you can checkout the extension walkthrough by opening the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and selecting "Welcome: Open walkthrough..." and then choosing the "Get started with FastAPI" walkthrough. \ No newline at end of file diff --git a/docs/en/docs/tutorial/index.md b/docs/en/docs/tutorial/index.md index 7212a0c4a9..ab5aa48dd6 100644 --- a/docs/en/docs/tutorial/index.md +++ b/docs/en/docs/tutorial/index.md @@ -84,6 +84,13 @@ If you want to install the standard dependencies but without the `fastapi-cloud- /// +/// tip + +FastAPI has an official extension for VS Code, which provides a lot of features, including a path operation explorer, path operation search, CodeLens navigation, and FastAPI Cloud deployment — all from your editor. + +/// + + ## Advanced User Guide { #advanced-user-guide } There is also an **Advanced User Guide** that you can read later after this **Tutorial - User guide**. diff --git a/docs/en/mkdocs.yml b/docs/en/mkdocs.yml index e86e7b9c41..adf35b3380 100644 --- a/docs/en/mkdocs.yml +++ b/docs/en/mkdocs.yml @@ -195,6 +195,7 @@ nav: - advanced/json-base64-bytes.md - advanced/strict-content-type.md - fastapi-cli.md + - editor-support.md - Deployment: - deployment/index.md - deployment/versions.md