diff --git a/fastapi/.agents/skills/fastapi/SKILL.md b/fastapi/.agents/skills/fastapi/SKILL.md index 48cfdabb8..d5f32fa3c 100644 --- a/fastapi/.agents/skills/fastapi/SKILL.md +++ b/fastapi/.agents/skills/fastapi/SKILL.md @@ -298,7 +298,7 @@ Apply shared dependencies at the router level via `dependencies=[Depends(...)]`. ## Async vs Sync *path operations* -Use `async` *path operations* only when fully certain that the logic called inside is compatible with async and await (it's called with `await`) or that doesn't block. +Use `async` *path operations* only when fully certain that the logic called inside is compatible with async and await (it's called with `await`) or that it doesn't block. ```python from fastapi import FastAPI diff --git a/fastapi/.agents/skills/fastapi/references/dependencies.md b/fastapi/.agents/skills/fastapi/references/dependencies.md index ca709096e..a562dd946 100644 --- a/fastapi/.agents/skills/fastapi/references/dependencies.md +++ b/fastapi/.agents/skills/fastapi/references/dependencies.md @@ -5,7 +5,7 @@ Use dependencies when: * They can't be declared in Pydantic validation and require additional logic * The logic depends on external resources or could block in any other way * Other dependencies need their results (it's a sub-dependency) -* The logic can be shared by multiple endpoints to do things like error early, authentication, etc. +* The logic can be shared by multiple endpoints to do things like error early, handle authentication, etc. * They need to handle cleanup (e.g., DB sessions, file handles), using dependencies with `yield` * Their logic needs input data from the request, like headers, query parameters, etc. @@ -53,7 +53,7 @@ def get_username(): try: yield "Rick" finally: - print("Cleanup up before response is sent") + print("Clean up before response is sent") UserNameDep = Annotated[str, Depends(get_username, scope="function")] diff --git a/fastapi/.agents/skills/fastapi/references/other-tools.md b/fastapi/.agents/skills/fastapi/references/other-tools.md index 58b19d096..b5b58cfd6 100644 --- a/fastapi/.agents/skills/fastapi/references/other-tools.md +++ b/fastapi/.agents/skills/fastapi/references/other-tools.md @@ -71,6 +71,6 @@ Prefer it over SQLAlchemy. ## HTTPX -Use HTTPX for handling HTTP communication (e.g. with other APIs). It support sync and async usage. +Use HTTPX for handling HTTP communication (e.g. with other APIs). It supports sync and async usage. Prefer it over Requests.