Browse Source

Merge branch 'master' into fix-duplicate-special-dependency-handling

pull/12406/head
Peter Volf 6 months ago
committed by GitHub
parent
commit
c284cf3a7d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/labeler.yml
  2. 1
      docs/en/data/sponsors_badge.yml
  3. 4
      docs/en/docs/release-notes.md
  4. 48
      docs/en/docs/tutorial/sql-databases.md
  5. 1
      docs/en/mkdocs.yml
  6. 3
      docs/it/docs/index.md
  7. 16
      docs/pt/docs/tutorial/cookie-param-models.md
  8. 1
      requirements-docs.txt
  9. 2
      scripts/docs.py

2
.github/workflows/labeler.yml

@ -17,6 +17,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
- run: echo "Done adding labels"
# Run this after labeler applied labels
check-labels:
needs:

1
docs/en/data/sponsors_badge.yml

@ -30,3 +30,4 @@ logins:
- svix
- zuplo-oss
- Kong
- speakeasy-api

4
docs/en/docs/release-notes.md

@ -35,6 +35,10 @@ hide:
### Internal
* 🔧 Add speakeasy-api to `sponsors_badge.yml`. PR [#12404](https://github.com/fastapi/fastapi/pull/12404) by [@tiangolo](https://github.com/tiangolo).
* ➕ Add docs dependency: markdown-include-variants. PR [#12399](https://github.com/fastapi/fastapi/pull/12399) by [@tiangolo](https://github.com/tiangolo).
* 📝 Fix extra mdx-base-path paths. PR [#12397](https://github.com/fastapi/fastapi/pull/12397) by [@tiangolo](https://github.com/tiangolo).
* 👷 Tweak labeler to not override custom labels. PR [#12398](https://github.com/fastapi/fastapi/pull/12398) by [@tiangolo](https://github.com/tiangolo).
* 👷 Update worfkow deploy-docs-notify URL. PR [#12392](https://github.com/fastapi/fastapi/pull/12392) by [@tiangolo](https://github.com/tiangolo).
* 👷 Update Cloudflare GitHub Action. PR [#12387](https://github.com/fastapi/fastapi/pull/12387) by [@tiangolo](https://github.com/tiangolo).
* ⬆ Bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.3. PR [#12386](https://github.com/fastapi/fastapi/pull/12386) by [@dependabot[bot]](https://github.com/apps/dependabot).

48
docs/en/docs/tutorial/sql-databases.md

@ -296,7 +296,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl
//// tab | Python 3.10+
```Python hl_lines="1 4-6 9-10 21-22 25-26"
{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!}
```
////
@ -304,7 +304,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl
//// tab | Python 3.9+
```Python hl_lines="3 6-8 11-12 23-24 27-28"
{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!}
```
////
@ -312,7 +312,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl
//// tab | Python 3.8+
```Python hl_lines="3 6-8 11-12 23-24 27-28"
{!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app/schemas.py!}
```
////
@ -346,7 +346,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti
//// tab | Python 3.10+
```Python hl_lines="13-15 29-32"
{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!}
```
////
@ -354,7 +354,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti
//// tab | Python 3.9+
```Python hl_lines="15-17 31-34"
{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!}
```
////
@ -362,7 +362,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti
//// tab | Python 3.8+
```Python hl_lines="15-17 31-34"
{!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app/schemas.py!}
```
////
@ -384,7 +384,7 @@ In the `Config` class, set the attribute `orm_mode = True`.
//// tab | Python 3.10+
```Python hl_lines="13 17-18 29 34-35"
{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!}
```
////
@ -392,7 +392,7 @@ In the `Config` class, set the attribute `orm_mode = True`.
//// tab | Python 3.9+
```Python hl_lines="15 19-20 31 36-37"
{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!}
```
////
@ -400,7 +400,7 @@ In the `Config` class, set the attribute `orm_mode = True`.
//// tab | Python 3.8+
```Python hl_lines="15 19-20 31 36-37"
{!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app/schemas.py!}
```
////
@ -559,7 +559,7 @@ In a very simplistic way create the database tables:
//// tab | Python 3.9+
```Python hl_lines="7"
{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
{!> ../../docs_src/sql_databases/sql_app_py39/main.py!}
```
////
@ -567,7 +567,7 @@ In a very simplistic way create the database tables:
//// tab | Python 3.8+
```Python hl_lines="9"
{!> ../../../docs_src/sql_databases/sql_app/main.py!}
{!> ../../docs_src/sql_databases/sql_app/main.py!}
```
////
@ -597,7 +597,7 @@ Our dependency will create a new SQLAlchemy `SessionLocal` that will be used in
//// tab | Python 3.9+
```Python hl_lines="13-18"
{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
{!> ../../docs_src/sql_databases/sql_app_py39/main.py!}
```
////
@ -605,7 +605,7 @@ Our dependency will create a new SQLAlchemy `SessionLocal` that will be used in
//// tab | Python 3.8+
```Python hl_lines="15-20"
{!> ../../../docs_src/sql_databases/sql_app/main.py!}
{!> ../../docs_src/sql_databases/sql_app/main.py!}
```
////
@ -629,7 +629,7 @@ This will then give us better editor support inside the *path operation function
//// tab | Python 3.9+
```Python hl_lines="22 30 36 45 51"
{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
{!> ../../docs_src/sql_databases/sql_app_py39/main.py!}
```
////
@ -637,7 +637,7 @@ This will then give us better editor support inside the *path operation function
//// tab | Python 3.8+
```Python hl_lines="24 32 38 47 53"
{!> ../../../docs_src/sql_databases/sql_app/main.py!}
{!> ../../docs_src/sql_databases/sql_app/main.py!}
```
////
@ -657,7 +657,7 @@ Now, finally, here's the standard **FastAPI** *path operations* code.
//// tab | Python 3.9+
```Python hl_lines="21-26 29-32 35-40 43-47 50-53"
{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
{!> ../../docs_src/sql_databases/sql_app_py39/main.py!}
```
////
@ -665,7 +665,7 @@ Now, finally, here's the standard **FastAPI** *path operations* code.
//// tab | Python 3.8+
```Python hl_lines="23-28 31-34 37-42 45-49 52-55"
{!> ../../../docs_src/sql_databases/sql_app/main.py!}
{!> ../../docs_src/sql_databases/sql_app/main.py!}
```
////
@ -766,7 +766,7 @@ For example, in a background task worker with <a href="https://docs.celeryq.dev"
//// tab | Python 3.10+
```Python
{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!}
```
////
@ -774,7 +774,7 @@ For example, in a background task worker with <a href="https://docs.celeryq.dev"
//// tab | Python 3.9+
```Python
{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!}
```
////
@ -782,7 +782,7 @@ For example, in a background task worker with <a href="https://docs.celeryq.dev"
//// tab | Python 3.8+
```Python
{!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
{!> ../../docs_src/sql_databases/sql_app/schemas.py!}
```
////
@ -798,7 +798,7 @@ For example, in a background task worker with <a href="https://docs.celeryq.dev"
//// tab | Python 3.9+
```Python
{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
{!> ../../docs_src/sql_databases/sql_app_py39/main.py!}
```
////
@ -806,7 +806,7 @@ For example, in a background task worker with <a href="https://docs.celeryq.dev"
//// tab | Python 3.8+
```Python
{!> ../../../docs_src/sql_databases/sql_app/main.py!}
{!> ../../docs_src/sql_databases/sql_app/main.py!}
```
////
@ -863,7 +863,7 @@ The middleware we'll add (just a function) will create a new SQLAlchemy `Session
//// tab | Python 3.9+
```Python hl_lines="12-20"
{!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!}
{!> ../../docs_src/sql_databases/sql_app_py39/alt_main.py!}
```
////
@ -871,7 +871,7 @@ The middleware we'll add (just a function) will create a new SQLAlchemy `Session
//// tab | Python 3.8+
```Python hl_lines="14-22"
{!> ../../../docs_src/sql_databases/sql_app/alt_main.py!}
{!> ../../docs_src/sql_databases/sql_app/alt_main.py!}
```
////

1
docs/en/mkdocs.yml

@ -305,6 +305,7 @@ markdown_extensions:
# Other extensions
mdx_include:
markdown_include_variants:
extra:
analytics:

3
docs/it/docs/index.md

@ -1,6 +1,3 @@
{!../../../docs/missing-translation.md!}
<p align="center">
<a href="https://fastapi.tiangolo.com"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a>
</p>

16
docs/pt/docs/tutorial/cookie-param-models.md

@ -23,7 +23,7 @@ Declare o parâmetro de **cookie** que você precisa em um **modelo Pydantic**,
//// tab | Python 3.10+
```Python hl_lines="9-12 16"
{!> ../../../docs_src/cookie_param_models/tutorial001_an_py310.py!}
{!> ../../docs_src/cookie_param_models/tutorial001_an_py310.py!}
```
////
@ -31,7 +31,7 @@ Declare o parâmetro de **cookie** que você precisa em um **modelo Pydantic**,
//// tab | Python 3.9+
```Python hl_lines="9-12 16"
{!> ../../../docs_src/cookie_param_models/tutorial001_an_py39.py!}
{!> ../../docs_src/cookie_param_models/tutorial001_an_py39.py!}
```
////
@ -39,7 +39,7 @@ Declare o parâmetro de **cookie** que você precisa em um **modelo Pydantic**,
//// tab | Python 3.8+
```Python hl_lines="10-13 17"
{!> ../../../docs_src/cookie_param_models/tutorial001_an.py!}
{!> ../../docs_src/cookie_param_models/tutorial001_an.py!}
```
////
@ -53,7 +53,7 @@ Prefira utilizar a versão `Annotated` se possível.
///
```Python hl_lines="7-10 14"
{!> ../../../docs_src/cookie_param_models/tutorial001_py310.py!}
{!> ../../docs_src/cookie_param_models/tutorial001_py310.py!}
```
////
@ -67,7 +67,7 @@ Prefira utilizar a versão `Annotated` se possível.
///
```Python hl_lines="9-12 16"
{!> ../../../docs_src/cookie_param_models/tutorial001.py!}
{!> ../../docs_src/cookie_param_models/tutorial001.py!}
```
////
@ -105,7 +105,7 @@ Agora a sua API possui o poder de contrar o seu próprio <abbr title="Isso é um
//// tab | Python 3.9+
```Python hl_lines="10"
{!> ../../../docs_src/cookie_param_models/tutorial002_an_py39.py!}
{!> ../../docs_src/cookie_param_models/tutorial002_an_py39.py!}
```
////
@ -113,7 +113,7 @@ Agora a sua API possui o poder de contrar o seu próprio <abbr title="Isso é um
//// tab | Python 3.8+
```Python hl_lines="11"
{!> ../../../docs_src/cookie_param_models/tutorial002_an.py!}
{!> ../../docs_src/cookie_param_models/tutorial002_an.py!}
```
////
@ -127,7 +127,7 @@ Prefira utilizar a versão `Annotated` se possível.
///
```Python hl_lines="10"
{!> ../../../docs_src/cookie_param_models/tutorial002.py!}
{!> ../../docs_src/cookie_param_models/tutorial002.py!}
```
////

1
requirements-docs.txt

@ -16,3 +16,4 @@ griffe-typingdoc==0.2.7
# For griffe, it formats with black
black==24.3.0
mkdocs-macros-plugin==1.0.5
markdown-include-variants==0.0.1

2
scripts/docs.py

@ -23,7 +23,7 @@ app = typer.Typer()
mkdocs_name = "mkdocs.yml"
missing_translation_snippet = """
{!../../../docs/missing-translation.md!}
{!../../docs/missing-translation.md!}
"""
non_translated_sections = [

Loading…
Cancel
Save