Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Install the core SDK and any desired extras using your preferred package manager
| **Core SDK** | `uv add a2a-sdk` | `pip install a2a-sdk` |
| **All Extras** | `uv add "a2a-sdk[all]"` | `pip install "a2a-sdk[all]"` |
| **HTTP Server** | `uv add "a2a-sdk[http-server]"` | `pip install "a2a-sdk[http-server]"` |
| **FastAPI** | `uv add "a2a-sdk[fastapi]"` | `pip install "a2a-sdk[fastapi]"` |
| **gRPC Support** | `uv add "a2a-sdk[grpc]"` | `pip install "a2a-sdk[grpc]"` |
| **OpenTelemetry Tracing**| `uv add "a2a-sdk[telemetry]"` | `pip install "a2a-sdk[telemetry]"` |
| **Encryption** | `uv add "a2a-sdk[encryption]"` | `pip install "a2a-sdk[encryption]"` |
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ classifiers = [

[project.optional-dependencies]
http-server = ["sse-starlette", "starlette"]
fastapi = ["a2a-sdk[http-server]", "fastapi>=0.115.2"]
encryption = ["cryptography>=43.0.0"]
grpc = ["grpcio>=1.60", "grpcio-tools>=1.60", "grpcio-status>=1.60", "grpcio_reflection>=1.7.0"]
telemetry = ["opentelemetry-api>=1.33.0", "opentelemetry-sdk>=1.33.0"]
Expand All @@ -48,6 +49,7 @@ sql = ["a2a-sdk[postgresql,mysql,sqlite]"]

all = [
"a2a-sdk[http-server]",
"a2a-sdk[fastapi]",
"a2a-sdk[sql]",
"a2a-sdk[encryption]",
"a2a-sdk[grpc]",
Expand Down
4 changes: 2 additions & 2 deletions src/a2a/server/routes/fastapi_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def add_a2a_routes_to_fastapi(
if not _package_fastapi_installed:
raise ImportError(
'The `fastapi` package is required to use '
'`add_a2a_routes_to_fastapi`. Install it alongside '
'`a2a-sdk[http-server]`.'
'`add_a2a_routes_to_fastapi`. It can be installed as part of '
'`a2a-sdk` optional dependencies, `a2a-sdk[fastapi]`.'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

The error message can be made more direct and actionable by instructing the user to install a2a-sdk[fastapi] directly, rather than describing it as an optional dependency.

Suggested change
'The `fastapi` package is required to use '
'`add_a2a_routes_to_fastapi`. Install it alongside '
'`a2a-sdk[http-server]`.'
'`add_a2a_routes_to_fastapi`. It can be installed as part of '
'`a2a-sdk` optional dependencies, `a2a-sdk[fastapi]`.'
'The "fastapi" package is required to use '
'"add_a2a_routes_to_fastapi". Please install '
'"a2a-sdk[fastapi]".'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in cb881e4 — message is now Install it via a2a-sdk[fastapi]. (matching the wording in #1087).

)

components: dict[str, Any] = {}
Expand Down
12 changes: 11 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading