Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
db0a123
feat(framework): Add FastAPI scaffold
danieljanes Jun 21, 2026
f1d7292
Apply suggestions from code review
danieljanes Jun 21, 2026
9747bf5
Merge branch 'main' into add-fastapi-scaffold
danieljanes Jun 21, 2026
c84ad18
Potential fix for pull request finding
danieljanes Jun 21, 2026
a15055a
Potential fix for pull request finding
danieljanes Jun 21, 2026
d4d0873
Potential fix for pull request finding
danieljanes Jun 21, 2026
25d0bf8
Potential fix for pull request finding
danieljanes Jun 21, 2026
6c5b37a
Merge branch 'main' into add-fastapi-scaffold
danieljanes Jun 21, 2026
7356ba6
Fix imports
danieljanes Jun 21, 2026
dc9eb84
Merge branch 'main' into add-fastapi-scaffold
danieljanes Jun 21, 2026
8ecf8fc
Merge branch 'main' into add-fastapi-scaffold
danieljanes Jun 22, 2026
851403c
Merge branch 'main' into add-fastapi-scaffold
tanertopal Jun 22, 2026
48bbe3d
Merge branch 'main' into add-fastapi-scaffold
danieljanes Jun 22, 2026
35ae364
Merge branch 'main' into add-fastapi-scaffold
danieljanes Jun 22, 2026
9b77027
Merge branch 'main' into add-fastapi-scaffold
tanertopal Jun 23, 2026
5ccace9
Merge branch 'main' into add-fastapi-scaffold
danieljanes Jun 23, 2026
7deab81
Introduce create_app()
danieljanes Jun 23, 2026
5f3f62e
Add lifespan
danieljanes Jun 23, 2026
5f0002b
refactor(framework): Move flower-superlink and flwr-serverapp entrypo…
danieljanes Jun 23, 2026
f8e53b8
Merge branch 'mv-cli-entrypoints' into add-fastapi-scaffold
danieljanes Jun 23, 2026
003155f
Merge branch 'main' into mv-cli-entrypoints
danieljanes Jun 23, 2026
b79a692
Merge branch 'main' into mv-cli-entrypoints
danieljanes Jun 24, 2026
7c68ae8
Add SuperLinkLifespan scaffold
danieljanes Jun 24, 2026
3560ff2
Add SuperLinkLifespanConfig
danieljanes Jun 24, 2026
0e13b05
Start FastAPI via flower-superlink
danieljanes Jun 24, 2026
ad5dda0
Minor edits
danieljanes Jun 24, 2026
4985279
Add wait_until_background_thread_exits
danieljanes Jun 24, 2026
383d10b
Add startup implementation
danieljanes Jun 24, 2026
cedfc05
Format
danieljanes Jun 24, 2026
5ad6881
Complete SuperLinkLifespan
danieljanes Jun 24, 2026
2f4dd78
Replace legacy startup with lifespan
danieljanes Jun 24, 2026
747c38b
Add --disable-grpc-api
danieljanes Jun 24, 2026
56dc409
Update FASTAPI.md
danieljanes Jun 24, 2026
0c69ee7
Merge branch 'main' into mv-cli-entrypoints
danieljanes Jun 24, 2026
44fc0c1
Merge branch 'main' into mv-cli-entrypoints
danieljanes Jun 25, 2026
983c967
Merge branch 'main' into mv-cli-entrypoints
danieljanes Jun 25, 2026
e78ba7d
Merge branch 'mv-cli-entrypoints' into add-fastapi-scaffold
danieljanes Jun 25, 2026
6529abc
Depend on fastapi without the standard extra
danieljanes Jun 25, 2026
0451914
Update uv.lock
danieljanes Jun 25, 2026
fbe1d4a
Merge branch 'main' into add-fastapi-scaffold
danieljanes Jun 25, 2026
76d1168
feat(framework): Create FastAPI scaffold
danieljanes Jun 25, 2026
dfaf1b3
Fix tests
danieljanes Jun 25, 2026
0d88f83
Merge branch 'main' into create-fastapi-scaffold
danieljanes Jun 26, 2026
8d61326
Merge branch 'create-fastapi-scaffold' into add-fastapi-scaffold
danieljanes Jun 26, 2026
4d915cf
Improve health router
danieljanes Jun 26, 2026
00bdc16
Update health router
danieljanes Jun 26, 2026
8cdee18
Update health router
danieljanes Jun 26, 2026
ebfb63f
refactor(framework): Create SuperLinkLifespanConfig
danieljanes Jun 26, 2026
87c1811
Merge branch 'create-superlink-lifespan-config' into add-fastapi-scaf…
danieljanes Jun 27, 2026
39a9919
refactor(framework): Introduce SuperLinkLifespan
danieljanes Jun 27, 2026
7c68770
Merge branch 'introduce-superlinklifespan' into add-fastapi-scaffold
danieljanes Jun 27, 2026
349b8bb
Merge branch 'main' into introduce-superlinklifespan
danieljanes Jun 29, 2026
a73a321
Merge branch 'introduce-superlinklifespan' into add-fastapi-scaffold
danieljanes Jun 29, 2026
49321ba
Merge branch 'main' into add-fastapi-scaffold
danieljanes Jun 29, 2026
cb015f1
Apply suggestion from @panh99
panh99 Jun 30, 2026
9f9864f
Apply suggestion from @panh99
panh99 Jun 30, 2026
9ea3728
Apply suggestion from @panh99
panh99 Jun 30, 2026
467b1e0
Merge branch 'main' into add-fastapi-scaffold
danieljanes Jun 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 35 additions & 5 deletions framework/FASTAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,51 @@

## Install

To run FastAPI, install `flwr` with all extras to ensure the `rest` extra is included:

```bash
uv sync --all-extras
uv sync --locked --all-extras
```

## Run SuperLink
## SuperLink Run Modes

With the new HTTP API, there are now four different options to start and run the SuperLink:

1. **Legacy Mode** `flower-superlink` (without `--enable-http-api`): This starts the SuperLink in "legacy mode" with only gRPC APIs, but no HTTP API.

```bash
uv run flower-superlink --insecure
```

1. **Compatibility Mode** `flower-superlink --enable-http-api`: This starts the SuperLink in Compatibility Mode with both the HTTP API and the legacy gRPC APIs. **This is what we're running in prod until the gRPC-to-HTTP conversion is complete.** Note that in Compatibility Mode, FastAPI is limited to only 1 worker, which is a serious limitation during this transition.

```bash
uv run flower-superlink --insecure --enable-http-api
```

1. **Next Mode** `flower-superlink --enable-http-api --disable-grpc-api`: This starts the SuperLink in "HTTP mode" with only the HTTP API, but not the legacy gRPC APIs.

```bash
uv run flower-superlink --insecure --enable-http-api --disable-grpc-api
```

1. **Experimental Mode** `uvicorn flwr.superlink.main:app`: This starts the SuperLink in "experimental mode" via uvicorn, skipping the `flower-superlink` argument parsing. This mode is experimental because it needs to reach parity with `flower-superlink --enable-http-api --disable-grpc-api`.

```bash
uv run uvicorn flwr.superlink.main:app
```

## Run SuperLink in Experimental Mode

Start the SuperLink FastAPI server using uvicorn:
Start the SuperLink's FastAPI server using uvicorn:

```bash
uv run uvicorn flwr.superlink.main:app
```

## Run SuperNode
## Run SuperNode in Experimental Mode

Start the SuperNode FastAPI server using uvicorn:
Start the SuperNode's FastAPI server using uvicorn:

```bash
uv run uvicorn flwr.supernode.main:app
Expand Down
Loading
Loading