Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摑 Add misc dependency installs to tutorial docs #2126

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/en/docs/tutorial/response-model.md
Expand Up @@ -39,6 +39,12 @@ Here we are declaring a `UserIn` model, it will contain a plaintext password:
{!../../../docs_src/response_model/tutorial002.py!}
```

!!! info
To use `EmailStr`, first install <a href="https://github.com/JoshData/python-email-validator" class="external-link" target="_blank">`email_validator`</a>.

E.g. `pip install email-validator`
or `pip install pydantic[email]`.

And we are using this model to declare our input and the same model to declare our output:

```Python hl_lines="17-18"
Expand Down
14 changes: 14 additions & 0 deletions docs/en/docs/tutorial/sql-databases.md
Expand Up @@ -80,6 +80,20 @@ The file `__init__.py` is just an empty file, but it tells Python that `sql_app`

Now let's see what each file/module does.

## Install `SQLAlchemy`

First you need to install `SQLAlchemy`:

<div class="termy">

```console
$ pip install sqlalchemy

---> 100%
```

</div>

## Create the SQLAlchemy parts

Let's refer to the file `sql_app/database.py`.
Expand Down
5 changes: 5 additions & 0 deletions docs/en/docs/tutorial/testing.md
Expand Up @@ -8,6 +8,11 @@ With it, you can use <a href="https://docs.pytest.org/" class="external-link" ta

## Using `TestClient`

!!! info
To use `TestClient`, first install <a href="https://github.com/psf/requests" class="external-link" target="_blank">`requests`</a>.

E.g. `pip install requests`.

Import `TestClient`.

Create a `TestClient` passing to it your **FastAPI**.
Expand Down