Skip to content

Commit 92bd792

Browse files
committed
Post final-QA
1 parent 6e668e2 commit 92bd792

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

fastapi/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ This repository contains code snippets discussed in the associated tutorial [Get
44

55
## Installation
66

7-
The recommended way to install FastAPI is with the `[standard]` extra dependencies. This ensures you get all the tools you need for developing an API without having to hunt down additional packages later:
7+
The recommended way to install FastAPI is with the [`[standard]`](https://github.com/fastapi/fastapi/blob/16d75d90eb96976a57b94cc24e4018859cd54c4d/pyproject.toml#L60) extra dependencies. This ensures you get all the tools you need for developing an API without having to hunt down additional packages later:
88

99
```console
1010
$ python -m pip install "fastapi[standard]"
1111
```
1212

13-
The quotes around `"fastapi[standard]"` ensure the command works correctly across different [terminals](https://realpython.com/terminal-commands/) and operating systems. With the command above, you install several useful packages, including the [FastAPI CLI](https://fastapi.tiangolo.com/fastapi-cli/) and [uvicorn](https://www.uvicorn.org/), an ASGI server for running your application.
13+
The quotes around `"fastapi[standard]"` ensure the command works correctly across different [terminals](https://realpython.com/terminal-commands/) and operating systems. With the command above, you install several useful packages, including the [FastAPI CLI](https://fastapi.tiangolo.com/fastapi-cli/) and [uvicorn](https://www.uvicorn.org/), an [ASGI](https://en.wikipedia.org/wiki/Asynchronous_Server_Gateway_Interface) server for running your application.
1414

1515
You can also use the `requirements.txt` file in this folder and run `python -m pip install -r requirements.txt` to install the standard dependencies of FastAPI.

fastapi/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from typing import Optional
2-
31
from pydantic import BaseModel
42

53
from fastapi import FastAPI
@@ -24,7 +22,7 @@ class Book(BaseModel):
2422

2523

2624
@app.get("/books")
27-
def get_books(limit: Optional[int] = None):
25+
def get_books(limit: int | None = None):
2826
"""Get all books, optionally limited by count."""
2927
if limit:
3028
return {"books": books[:limit]}

0 commit comments

Comments
 (0)