diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7175d21eb..e9e299b1c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.8 + rev: v0.12.10 hooks: - id: ruff args: diff --git a/README.md b/README.md index 95d123819..6f13f9eae 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,6 @@ The key features are: - @@ -55,7 +54,6 @@ The key features are: - @@ -91,7 +89,7 @@ The key features are: "_I’m over the moon excited about **FastAPI**. It’s so fun!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -105,7 +103,7 @@ The key features are: "_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/SECURITY.md b/SECURITY.md index db412cf2c..87e87e0ca 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -16,7 +16,7 @@ You can learn more about [FastAPI versions and how to pin and upgrade them](http If you think you found a vulnerability, and even if you are not sure about it, please report it right away by sending an email to: security@tiangolo.com. Please try to be as explicit as possible, describing all the steps and example code to reproduce the security issue. -I (the author, [@tiangolo](https://twitter.com/tiangolo)) will review it thoroughly and get back to you. +I (the author, [@tiangolo](https://x.com/tiangolo)) will review it thoroughly and get back to you. ## Public Discussions diff --git a/docs/az/docs/index.md b/docs/az/docs/index.md index fbbbce130..4e14d7060 100644 --- a/docs/az/docs/index.md +++ b/docs/az/docs/index.md @@ -81,7 +81,7 @@ FastAPI Python ilə API yaratmaq üçün standart Python Brian Okken - Python Bytes podcast host (ref) +
Brian Okken - Python Bytes podcast host (ref)
--- @@ -95,7 +95,7 @@ FastAPI Python ilə API yaratmaq üçün standart Python Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref) +
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/bn/docs/index.md b/docs/bn/docs/index.md index 74ee230a1..84acc0798 100644 --- a/docs/bn/docs/index.md +++ b/docs/bn/docs/index.md @@ -82,7 +82,7 @@ FastAPI একটি আধুনিক, দ্রুত ( বেশি ক্ "_আমি **FastAPI** নিয়ে চাঁদের সমান উৎসাহিত। এটি খুবই মজার!_" -
ব্রায়ান ওকেন - পাইথন বাইটস পডকাস্ট হোস্ট (ref)
+
ব্রায়ান ওকেন - পাইথন বাইটস পডকাস্ট হোস্ট (ref)
--- @@ -96,7 +96,7 @@ FastAPI একটি আধুনিক, দ্রুত ( বেশি ক্ "_আমরা আমাদের **APIs** [...] এর জন্য **FastAPI**- তে এসেছি [...] আমি মনে করি আপনিও এটি পছন্দ করবেন [...]_" -
ইনেস মন্টানি - ম্যাথিউ হোনিবাল - Explosion AI প্রতিষ্ঠাতা - spaCy স্রষ্টা (ref) - (ref)
+
ইনেস মন্টানি - ম্যাথিউ হোনিবাল - Explosion AI প্রতিষ্ঠাতা - spaCy স্রষ্টা (ref) - (ref)
--- diff --git a/docs/de/docs/deployment/cloud.md b/docs/de/docs/deployment/cloud.md index e3d08f8dc..ca1ba3b3b 100644 --- a/docs/de/docs/deployment/cloud.md +++ b/docs/de/docs/deployment/cloud.md @@ -12,7 +12,5 @@ Und es zeigt ihr wahres Engagement für FastAPI und seine **Community** (Sie), d Vielleicht möchten Sie deren Dienste ausprobieren und deren Anleitungen folgen: -* Platform.sh -* Porter * Render * Railway diff --git a/docs/de/docs/tutorial/path-params.md b/docs/de/docs/tutorial/path-params.md index 5f5e229a8..247ae78fd 100644 --- a/docs/de/docs/tutorial/path-params.md +++ b/docs/de/docs/tutorial/path-params.md @@ -56,8 +56,7 @@ Wenn Sie aber im Browser 🐁. ✋️ 📟 🌌 🌖 🏗 🤔, ℹ, & 💭 🔃. -⏮️ ⏬ ✳ / 🖥 🕸, 👆 🔜 ✔️ ⚙️ "⏲". ❔ ↘️ ⏲ 🔥😈. +⏮️ ⏬ ✳ / 🖥 🕸, 👆 🔜 ✔️ ⚙️ "⏲". ❔ ↘️ "⏲ 🔥😈". ## 🔁 diff --git a/docs/em/docs/help-fastapi.md b/docs/em/docs/help-fastapi.md index 099485222..9d802f9e4 100644 --- a/docs/em/docs/help-fastapi.md +++ b/docs/em/docs/help-fastapi.md @@ -22,7 +22,7 @@ ## ⏩ FastAPI 🔛 👱📔 -⏩ 🐶 Fastapi 🔛 **👱📔** 🤚 📰 📰 🔃 **FastAPI**. 👶 +⏩ 🐶 Fastapi 🔛 **👱📔** 🤚 📰 📰 🔃 **FastAPI**. 👶 ## ✴ **FastAPI** 📂 @@ -47,10 +47,10 @@ * ⏩ 👤 🔛 **📂**. * 👀 🎏 📂 ℹ 🏗 👤 ✔️ ✍ 👈 💪 ℹ 👆. * ⏩ 👤 👀 🕐❔ 👤 ✍ 🆕 📂 ℹ 🏗. -* ⏩ 👤 🔛 **👱📔** ⚖️ . +* ⏩ 👤 🔛 **👱📔** ⚖️ . * 💬 👤 ❔ 👆 ⚙️ FastAPI (👤 💌 👂 👈). * 👂 🕐❔ 👤 ⚒ 🎉 ⚖️ 🚀 🆕 🧰. - * 👆 💪 ⏩ 🐶 Fastapi 🔛 👱📔 (🎏 🏧). + * 👆 💪 ⏩ 🐶 Fastapi 🔛 👱📔 (🎏 🏧). * 🔗 ⏮️ 👤 🔛 **👱📔**. * 👂 🕐❔ 👤 ⚒ 🎉 ⚖️ 🚀 🆕 🧰 (👐 👤 ⚙️ 👱📔 🌖 🛎 🤷 ♂). * ✍ ⚫️❔ 👤 ✍ (⚖️ ⏩ 👤) 🔛 **🇸🇲.** ⚖️ **🔉**. @@ -59,7 +59,7 @@ ## 👱📔 🔃 **FastAPI** -👱📔 🔃 **FastAPI** & ➡️ 👤 & 🎏 💭 ⚫️❔ 👆 💖 ⚫️. 👶 +👱📔 🔃 **FastAPI** & ➡️ 👤 & 🎏 💭 ⚫️❔ 👆 💖 ⚫️. 👶 👤 💌 👂 🔃 ❔ **FastAPI** 💆‍♂ ⚙️, ⚫️❔ 👆 ✔️ 💖 ⚫️, ❔ 🏗/🏢 👆 ⚙️ ⚫️, ♒️. diff --git a/docs/em/docs/index.md b/docs/em/docs/index.md index 57be59b07..fac4ba91a 100644 --- a/docs/em/docs/index.md +++ b/docs/em/docs/index.md @@ -87,7 +87,7 @@ FastAPI 🏛, ⏩ (↕-🎭), 🕸 🛠️ 🏗 🛠️ ⏮️ 🐍 3️⃣.8️ "_👤 🤭 🌕 😄 🔃 **FastAPI**. ⚫️ 🎊 ❗_" -
✡ 🇭🇰 - 🐍 🔢 📻 🦠 (🇦🇪)
+
✡ 🇭🇰 - 🐍 🔢 📻 🦠 (🇦🇪)
--- @@ -101,7 +101,7 @@ FastAPI 🏛, ⏩ (↕-🎭), 🕸 🛠️ 🏗 🛠️ ⏮️ 🐍 3️⃣.8️ "_👥 ✔️ 🎛 🤭 **FastAPI** 👆 **🔗** [...] 👤 💭 👆 🔜 💖 ⚫️ [...]_" -
🇱🇨 🇸🇲 - ✡ Honnibal - 💥 👲 🕴 - 🌈 👼 (🇦🇪) - (🇦🇪)
+
🇱🇨 🇸🇲 - ✡ Honnibal - 💥 👲 🕴 - 🌈 👼 (🇦🇪) - (🇦🇪)
--- diff --git a/docs/en/data/external_links.yml b/docs/en/data/external_links.yml index 50f84ecbf..c1191b460 100644 --- a/docs/en/data/external_links.yml +++ b/docs/en/data/external_links.yml @@ -121,11 +121,11 @@ Articles: link: https://valonjanuzaj.medium.com/deploy-a-dockerized-fastapi-application-to-aws-cc757830ba1b title: Deploy a dockerized FastAPI application to AWS - author: Amit Chaudhary - author_link: https://twitter.com/amitness + author_link: https://x.com/amitness link: https://amitness.com/2020/06/fastapi-vs-flask/ title: FastAPI for Flask Users - author: Louis Guitton - author_link: https://twitter.com/louis_guitton + author_link: https://x.com/louis_guitton link: https://guitton.co/posts/fastapi-monitoring/ title: How to monitor your FastAPI service - author: Precious Ndubueze @@ -149,7 +149,7 @@ Articles: link: https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072 title: Introducing Dispatch - author: Stavros Korokithakis - author_link: https://twitter.com/Stavros + author_link: https://x.com/Stavros link: https://www.stavros.io/posts/fastapi-with-django/ title: Using FastAPI with Django - author: Twilio @@ -157,11 +157,11 @@ Articles: link: https://www.twilio.com/blog/build-secure-twilio-webhook-python-fastapi title: Build a Secure Twilio Webhook with Python and FastAPI - author: Sebastián Ramírez (tiangolo) - author_link: https://twitter.com/tiangolo + author_link: https://x.com/tiangolo link: https://dev.to/tiangolo/build-a-web-api-from-scratch-with-fastapi-the-workshop-2ehe title: Build a web API from scratch with FastAPI - the workshop - author: Paul Sec - author_link: https://twitter.com/PaulWebSec + author_link: https://x.com/PaulWebSec link: https://paulsec.github.io/posts/fastapi_plus_zeit_serverless_fu/ title: FastAPI + Zeit.co = 🚀 - author: cuongld2 @@ -169,7 +169,7 @@ Articles: link: https://dev.to/cuongld2/build-simple-api-service-with-python-fastapi-part-1-581o title: Build simple API service with Python FastAPI — Part 1 - author: Paurakh Sharma Humagain - author_link: https://twitter.com/PaurakhSharma + author_link: https://x.com/PaurakhSharma link: https://dev.to/paurakhsharma/microservice-in-python-using-fastapi-24cc title: Microservice in Python using FastAPI - author: Guillermo Cruz @@ -181,7 +181,7 @@ Articles: link: https://www.tutlinks.com/create-and-deploy-fastapi-app-to-heroku/ title: Create and Deploy FastAPI app to Heroku without using Docker - author: Arthur Henrique - author_link: https://twitter.com/arthurheinrique + author_link: https://x.com/arthurheinrique link: https://medium.com/@arthur393/another-boilerplate-to-fastapi-azure-pipeline-ci-pytest-3c8d9a4be0bb title: 'Another Boilerplate to FastAPI: Azure Pipeline CI + Pytest' - author: Shane Soh @@ -221,7 +221,7 @@ Articles: link: https://towardsdatascience.com/how-to-deploy-a-machine-learning-model-dc51200fe8cf title: How to Deploy a Machine Learning Model - author: Johannes Gontrum - author_link: https://twitter.com/gntrm + author_link: https://x.com/gntrm link: https://medium.com/@gntrm/jwt-authentication-with-fastapi-and-aws-cognito-1333f7f2729e title: JWT Authentication with FastAPI and AWS Cognito - author: Ankush Thakur @@ -257,7 +257,7 @@ Articles: link: https://medium.com/@williamhayes/fastapi-starlette-debug-vs-prod-5f7561db3a59 title: FastAPI/Starlette debug vs prod - author: Mukul Mantosh - author_link: https://twitter.com/MantoshMukul + author_link: https://x.com/MantoshMukul link: https://www.jetbrains.com/pycharm/guide/tutorials/fastapi-aws-kubernetes/ title: Developing FastAPI Application using K8s & AWS - author: KrishNa @@ -282,7 +282,7 @@ Articles: link: https://www.actidoo.com/de/blog/python-fastapi-domain-driven-design title: Domain-driven Design mit Python und FastAPI - author: Nico Axtmann - author_link: https://twitter.com/_nicoax + author_link: https://x.com/_nicoax link: https://blog.codecentric.de/2019/08/inbetriebnahme-eines-scikit-learn-modells-mit-onnx-und-fastapi/ title: Inbetriebnahme eines scikit-learn-Modells mit ONNX und FastAPI - author: Felix Schürmeyer @@ -400,15 +400,15 @@ Talks: link: https://www.youtube.com/watch?v=uZdTe8_Z6BQ title: 'PyCon AU 2023: Testing asynchronous applications with FastAPI and pytest' - author: Sebastián Ramírez (tiangolo) - author_link: https://twitter.com/tiangolo + author_link: https://x.com/tiangolo link: https://www.youtube.com/watch?v=PnpTY1f4k2U title: '[VIRTUAL] Py.Amsterdam''s flying Software Circus: Intro to FastAPI' - author: Sebastián Ramírez (tiangolo) - author_link: https://twitter.com/tiangolo + author_link: https://x.com/tiangolo link: https://www.youtube.com/watch?v=z9K5pwb0rt8 title: 'PyConBY 2020: Serve ML models easily with FastAPI' - author: Chris Withers - author_link: https://twitter.com/chriswithers13 + author_link: https://x.com/chriswithers13 link: https://www.youtube.com/watch?v=3DLwPcrE5mA title: 'PyCon UK 2019: FastAPI from the ground up' Taiwanese: diff --git a/docs/en/data/sponsors.yml b/docs/en/data/sponsors.yml index 2b3cd282d..ae28410e7 100644 --- a/docs/en/data/sponsors.yml +++ b/docs/en/data/sponsors.yml @@ -2,9 +2,6 @@ gold: - url: https://blockbee.io?ref=fastapi title: BlockBee Cryptocurrency Payment Gateway img: https://fastapi.tiangolo.com/img/sponsors/blockbee.png - - url: https://platform.sh/try-it-now/?utm_source=fastapi-signup&utm_medium=banner&utm_campaign=FastAPI-signup-June-2023 - title: "Build, run and scale your apps on a modern, reliable, and secure PaaS." - img: https://fastapi.tiangolo.com/img/sponsors/platform-sh.png - url: https://github.com/scalar/scalar/?utm_source=fastapi&utm_medium=website&utm_campaign=main-badge title: "Scalar: Beautiful Open-Source API References from Swagger/OpenAPI files" img: https://fastapi.tiangolo.com/img/sponsors/scalar.svg @@ -26,9 +23,6 @@ gold: - url: https://subtotal.com/?utm_source=fastapi&utm_medium=sponsorship&utm_campaign=open-source title: The Gold Standard in Retail Account Linking img: https://fastapi.tiangolo.com/img/sponsors/subtotal.svg - - url: https://vibe.mobb.ai/?utm_source=Fast+APi&utm_medium=Image&utm_campaign=MVS - title: Secure Your AI-Generated Code to Unlock Dev Productivity - img: https://fastapi.tiangolo.com/img/sponsors/mobbai.png - url: https://docs.railway.com/guides/fastapi?utm_medium=integration&utm_source=docs&utm_campaign=fastapi title: Deploy enterprise applications at startup speed img: https://fastapi.tiangolo.com/img/sponsors/railway.png diff --git a/docs/en/docs/advanced/middleware.md b/docs/en/docs/advanced/middleware.md index 4ca07676b..d1be4afff 100644 --- a/docs/en/docs/advanced/middleware.md +++ b/docs/en/docs/advanced/middleware.md @@ -68,6 +68,7 @@ Enforces that all incoming requests have a correctly set `Host` header, in order The following arguments are supported: * `allowed_hosts` - A list of domain names that should be allowed as hostnames. Wildcard domains such as `*.example.com` are supported for matching subdomains. To allow any hostname either use `allowed_hosts=["*"]` or omit the middleware. +* `www_redirect` - If set to True, requests to non-www versions of the allowed hosts will be redirected to their www counterparts. Defaults to `True`. If an incoming request does not validate correctly then a `400` response will be sent. diff --git a/docs/en/docs/advanced/security/oauth2-scopes.md b/docs/en/docs/advanced/security/oauth2-scopes.md index 0a84435e6..67c927cd0 100644 --- a/docs/en/docs/advanced/security/oauth2-scopes.md +++ b/docs/en/docs/advanced/security/oauth2-scopes.md @@ -4,9 +4,9 @@ You can use OAuth2 scopes directly with **FastAPI**, they are integrated to work This would allow you to have a more fine-grained permission system, following the OAuth2 standard, integrated into your OpenAPI application (and the API docs). -OAuth2 with scopes is the mechanism used by many big authentication providers, like Facebook, Google, GitHub, Microsoft, Twitter, etc. They use it to provide specific permissions to users and applications. +OAuth2 with scopes is the mechanism used by many big authentication providers, like Facebook, Google, GitHub, Microsoft, X (Twitter), etc. They use it to provide specific permissions to users and applications. -Every time you "log in with" Facebook, Google, GitHub, Microsoft, Twitter, that application is using OAuth2 with scopes. +Every time you "log in with" Facebook, Google, GitHub, Microsoft, X (Twitter), that application is using OAuth2 with scopes. In this section you will see how to manage authentication and authorization with the same OAuth2 with scopes in your **FastAPI** application. @@ -62,7 +62,7 @@ For OAuth2 they are just strings. First, let's quickly see the parts that change from the examples in the main **Tutorial - User Guide** for [OAuth2 with Password (and hashing), Bearer with JWT tokens](../../tutorial/security/oauth2-jwt.md){.internal-link target=_blank}. Now using OAuth2 scopes: -{* ../../docs_src/security/tutorial005_an_py310.py hl[5,9,13,47,65,106,108:116,122:125,129:135,140,156] *} +{* ../../docs_src/security/tutorial005_an_py310.py hl[5,9,13,47,65,106,108:116,122:126,130:136,141,157] *} Now let's review those changes step by step. @@ -98,7 +98,7 @@ But in your application, for security, you should make sure you only add the sco /// -{* ../../docs_src/security/tutorial005_an_py310.py hl[156] *} +{* ../../docs_src/security/tutorial005_an_py310.py hl[157] *} ## Declare scopes in *path operations* and dependencies { #declare-scopes-in-path-operations-and-dependencies } @@ -124,7 +124,7 @@ We are doing it here to demonstrate how **FastAPI** handles scopes declared at d /// -{* ../../docs_src/security/tutorial005_an_py310.py hl[5,140,171] *} +{* ../../docs_src/security/tutorial005_an_py310.py hl[5,141,172] *} /// info | Technical Details @@ -180,7 +180,7 @@ Instead of, for example, a `dict`, or something else, as it could break the appl We also verify that we have a user with that username, and if not, we raise that same exception we created before. -{* ../../docs_src/security/tutorial005_an_py310.py hl[47,117:128] *} +{* ../../docs_src/security/tutorial005_an_py310.py hl[47,117:129] *} ## Verify the `scopes` { #verify-the-scopes } @@ -188,7 +188,7 @@ We now verify that all the scopes required, by this dependency and all the depen For this, we use `security_scopes.scopes`, that contains a `list` with all these scopes as `str`. -{* ../../docs_src/security/tutorial005_an_py310.py hl[129:135] *} +{* ../../docs_src/security/tutorial005_an_py310.py hl[130:136] *} ## Dependency tree and scopes { #dependency-tree-and-scopes } diff --git a/docs/en/docs/advanced/testing-events.md b/docs/en/docs/advanced/testing-events.md index d0f2d1a79..cb8881a09 100644 --- a/docs/en/docs/advanced/testing-events.md +++ b/docs/en/docs/advanced/testing-events.md @@ -1,5 +1,12 @@ -# Testing Events: startup - shutdown { #testing-events-startup-shutdown } +# Testing Events: lifespan and startup - shutdown { #testing-events-lifespan-and-startup-shutdown } -When you need your event handlers (`startup` and `shutdown`) to run in your tests, you can use the `TestClient` with a `with` statement: +When you need `lifespan` to run in your tests, you can use the `TestClient` with a `with` statement: + +{* ../../docs_src/app_testing/tutorial004.py hl[9:15,18,27:28,30:32,41:43] *} + + +You can read more details about the ["Running lifespan in tests in the official Starlette documentation site."](https://www.starlette.io/lifespan/#running-lifespan-in-tests) + +For the deprecated `startup` and `shutdown` events, you can use the `TestClient` as follows: {* ../../docs_src/app_testing/tutorial003.py hl[9:12,20:24] *} diff --git a/docs/en/docs/async.md b/docs/en/docs/async.md index 1d2be0bb6..eac473bde 100644 --- a/docs/en/docs/async.md +++ b/docs/en/docs/async.md @@ -383,7 +383,7 @@ But before that, handling asynchronous code was quite more complex and difficult In previous versions of Python, you could have used threads or Gevent. But the code is way more complex to understand, debug, and think about. -In previous versions of NodeJS / Browser JavaScript, you would have used "callbacks". Which leads to callback hell. +In previous versions of NodeJS / Browser JavaScript, you would have used "callbacks". Which leads to "callback hell". ## Coroutines { #coroutines } diff --git a/docs/en/docs/deployment/cloud.md b/docs/en/docs/deployment/cloud.md index cb723dd13..c88c4b51a 100644 --- a/docs/en/docs/deployment/cloud.md +++ b/docs/en/docs/deployment/cloud.md @@ -12,7 +12,5 @@ And it shows their true commitment to FastAPI and its **community** (you), as th You might want to try their services and follow their guides: -* Platform.sh -* Porter * Render * Railway diff --git a/docs/en/docs/help-fastapi.md b/docs/en/docs/help-fastapi.md index 0b9ac4f0b..c7acd69a6 100644 --- a/docs/en/docs/help-fastapi.md +++ b/docs/en/docs/help-fastapi.md @@ -20,9 +20,9 @@ You can subscribe to the (infrequent) [**FastAPI and friends** newsletter](newsl * Breaking changes 🚨 * Tips and tricks ✅ -## Follow FastAPI on Twitter { #follow-fastapi-on-twitter } +## Follow FastAPI on X (Twitter) { #follow-fastapi-on-x-twitter } -Follow @fastapi on **Twitter** to get the latest news about **FastAPI**. 🐦 +Follow @fastapi on **X (Twitter)** to get the latest news about **FastAPI**. 🐦 ## Star **FastAPI** in GitHub { #star-fastapi-in-github } @@ -47,19 +47,19 @@ You can: * Follow me on **GitHub**. * See other Open Source projects I have created that could help you. * Follow me to see when I create a new Open Source project. -* Follow me on **Twitter** or Mastodon. +* Follow me on **X (Twitter)** or Mastodon. * Tell me how you use FastAPI (I love to hear that). * Hear when I make announcements or release new tools. - * You can also follow @fastapi on Twitter (a separate account). + * You can also follow @fastapi on X (Twitter) (a separate account). * Follow me on **LinkedIn**. - * Hear when I make announcements or release new tools (although I use Twitter more often 🤷‍♂). + * Hear when I make announcements or release new tools (although I use X (Twitter) more often 🤷‍♂). * Read what I write (or follow me) on **Dev.to** or **Medium**. * Read other ideas, articles, and read about tools I have created. * Follow me to read when I publish something new. ## Tweet about **FastAPI** { #tweet-about-fastapi } -Tweet about **FastAPI** and let me and others know why you like it. 🎉 +Tweet about **FastAPI** and let me and others know why you like it. 🎉 I love to hear about how **FastAPI** is being used, what you have liked in it, in which project/company are you using it, etc. diff --git a/docs/en/docs/index.md b/docs/en/docs/index.md index db22ea0f9..aaadf3cc2 100644 --- a/docs/en/docs/index.md +++ b/docs/en/docs/index.md @@ -87,7 +87,7 @@ The key features are: "_I’m over the moon excited about **FastAPI**. It’s so fun!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -101,7 +101,7 @@ The key features are: "_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/en/docs/js/termynal.js b/docs/en/docs/js/termynal.js index 4ac32708a..82d04e2d0 100644 --- a/docs/en/docs/js/termynal.js +++ b/docs/en/docs/js/termynal.js @@ -133,7 +133,7 @@ class Termynal { this.container.innerHTML = '' this.init() } - restart.href = '#' + restart.href = "javascript:void(0)" restart.setAttribute('data-terminal-control', '') restart.innerHTML = "restart ↻" return restart @@ -147,7 +147,7 @@ class Termynal { this.typeDelay = 0 this.startDelay = 0 } - finish.href = '#' + finish.href = "javascript:void(0)" finish.setAttribute('data-terminal-control', '') finish.innerHTML = "fast →" this.finishElement = finish diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index bfa253408..128ace37b 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -9,11 +9,21 @@ hide: ### Docs +* 📝 Add deprecation info block about `dict()` in `docs/tutorial/body.md`. PR [#13906](https://github.com/fastapi/fastapi/pull/13906) by [@jomkv](https://github.com/jomkv). +* 📝 Fix Twitter to be X (Twitter) everywhere in documentation. PR [#13809](https://github.com/fastapi/fastapi/pull/13809) by [@valentinDruzhinin](https://github.com/valentinDruzhinin). +* 🐛 Prevent scroll-to-top on restart/fast buttons in `termynal.js`. PR [#13714](https://github.com/fastapi/fastapi/pull/13714) by [@Ashish-Pandey62](https://github.com/Ashish-Pandey62). +* 📝 Update testing events documentation. PR [#13259](https://github.com/fastapi/fastapi/pull/13259) by [@z0z0r4](https://github.com/z0z0r4). +* 📝 Remove obsolete `url` field in error responses in docs. PR [#13655](https://github.com/fastapi/fastapi/pull/13655) by [@Taoup](https://github.com/Taoup). +* 📝 Bring the `scope` claim in line with the standard in `docs_src/security/tutorial005.py`. PR [#11189](https://github.com/fastapi/fastapi/pull/11189) by [@DurandA](https://github.com/DurandA). +* 📝 Update TrustedHostMiddleware Documentation. PR [#11441](https://github.com/fastapi/fastapi/pull/11441) by [@soulee-dev](https://github.com/soulee-dev). +* 📝 Remove links to site callbackhell.com that doesn't exist anymore. PR [#14006](https://github.com/fastapi/fastapi/pull/14006) by [@dennybiasiolli](https://github.com/dennybiasiolli). +* 📝 Add permalinks to headers in English docs. PR [#13993](https://github.com/fastapi/fastapi/pull/13993) by [@YuriiMotov](https://github.com/YuriiMotov). * 📝 Update `docs/en/docs/advanced/generate-clients.md`. PR [#13793](https://github.com/fastapi/fastapi/pull/13793) by [@mrlubos](https://github.com/mrlubos). * 📝 Add discussion template for new language translation requests. PR [#13535](https://github.com/fastapi/fastapi/pull/13535) by [@alejsdev](https://github.com/alejsdev). ### Translations +* 📝 Fix code include for Pydantic models example in `docs/zh/docs/python-types.md`. PR [#13997](https://github.com/fastapi/fastapi/pull/13997) by [@anfreshman](https://github.com/anfreshman). * 🌐 Update Portuguese Translation for `docs/pt/docs/async.md`. PR [#13863](https://github.com/fastapi/fastapi/pull/13863) by [@EdmilsonRodrigues](https://github.com/EdmilsonRodrigues). * 📝 Fix highlight line in `docs/ja/docs/tutorial/body.md`. PR [#13927](https://github.com/fastapi/fastapi/pull/13927) by [@KoyoMiyazaki](https://github.com/KoyoMiyazaki). * 🌐 Add Persian translation for `docs/fa/docs/environment-variables.md`. PR [#13923](https://github.com/fastapi/fastapi/pull/13923) by [@Mohammad222PR](https://github.com/Mohammad222PR). @@ -24,6 +34,12 @@ hide: ### Internal +* 🔧 Update sponsors: remove Platform.sh. PR [#14027](https://github.com/fastapi/fastapi/pull/14027) by [@tiangolo](https://github.com/tiangolo). +* 🔧 Update sponsors: remove Mobb. PR [#14026](https://github.com/fastapi/fastapi/pull/14026) by [@tiangolo](https://github.com/tiangolo). +* 🛠️ Update `mkdocs_hooks` to handle headers with permalinks when building docs. PR [#14025](https://github.com/fastapi/fastapi/pull/14025) by [@tiangolo](https://github.com/tiangolo). +* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#14016](https://github.com/fastapi/fastapi/pull/14016) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). +* ⬆ Bump `mkdocs-macros-plugin` from 1.3.7 to 1.3.9. PR [#14003](https://github.com/fastapi/fastapi/pull/14003) by [@YuriiMotov](https://github.com/YuriiMotov). +* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#13999](https://github.com/fastapi/fastapi/pull/13999) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#13983](https://github.com/fastapi/fastapi/pull/13983) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * ⬆ Bump actions/checkout from 4 to 5. PR [#13986](https://github.com/fastapi/fastapi/pull/13986) by [@dependabot[bot]](https://github.com/apps/dependabot). * 🔧 Update Speakeasy sponsor graphic. PR [#13971](https://github.com/fastapi/fastapi/pull/13971) by [@chailandau](https://github.com/chailandau). @@ -4123,7 +4139,7 @@ Soon there will be a new FastAPI release upgrading Starlette to take advantage o * ✅ Add the `docs_src` directory to test coverage and update tests. Initial PR [#1904](https://github.com/tiangolo/fastapi/pull/1904) by [@Kludex](https://github.com/Kludex). * 🔧 Add new GitHub templates with forms for new issues. PR [#3612](https://github.com/tiangolo/fastapi/pull/3612) by [@tiangolo](https://github.com/tiangolo). -* 📝 Add official FastAPI Twitter to docs: [@fastapi](https://twitter.com/fastapi). PR [#3578](https://github.com/tiangolo/fastapi/pull/3578) by [@tiangolo](https://github.com/tiangolo). +* 📝 Add official FastAPI Twitter to docs: [@fastapi](https://x.com/fastapi). PR [#3578](https://github.com/tiangolo/fastapi/pull/3578) by [@tiangolo](https://github.com/tiangolo). ## 0.67.0 @@ -4231,7 +4247,7 @@ But requests with content type `text/plain` are exempt from [CORS](https://devel See [CVE-2021-32677](https://github.com/tiangolo/fastapi/security/advisories/GHSA-8h2j-cgx8-6xv7) for more details. -Thanks to [Dima Boger](https://twitter.com/b0g3r) for the security report! 🙇🔒 +Thanks to [Dima Boger](https://x.com/b0g3r) for the security report! 🙇🔒 ### Internal @@ -4782,18 +4798,18 @@ Note: all the previous parameters are still there, so it's still possible to dec * Add new links: * **English articles**: * [Real-time Notifications with Python and Postgres](https://wuilly.com/2019/10/real-time-notifications-with-python-and-postgres/) by [Guillermo Cruz](https://wuilly.com/). - * [Microservice in Python using FastAPI](https://dev.to/paurakhsharma/microservice-in-python-using-fastapi-24cc) by [Paurakh Sharma Humagain](https://twitter.com/PaurakhSharma). + * [Microservice in Python using FastAPI](https://dev.to/paurakhsharma/microservice-in-python-using-fastapi-24cc) by [Paurakh Sharma Humagain](https://x.com/PaurakhSharma). * [Build simple API service with Python FastAPI — Part 1](https://dev.to/cuongld2/build-simple-api-service-with-python-fastapi-part-1-581o) by [cuongld2](https://dev.to/cuongld2). - * [FastAPI + Zeit.co = 🚀](https://paulsec.github.io/posts/fastapi_plus_zeit_serverless_fu/) by [Paul Sec](https://twitter.com/PaulWebSec). - * [Build a web API from scratch with FastAPI - the workshop](https://dev.to/tiangolo/build-a-web-api-from-scratch-with-fastapi-the-workshop-2ehe) by [Sebastián Ramírez (tiangolo)](https://twitter.com/tiangolo). + * [FastAPI + Zeit.co = 🚀](https://paulsec.github.io/posts/fastapi_plus_zeit_serverless_fu/) by [Paul Sec](https://x.com/PaulWebSec). + * [Build a web API from scratch with FastAPI - the workshop](https://dev.to/tiangolo/build-a-web-api-from-scratch-with-fastapi-the-workshop-2ehe) by [Sebastián Ramírez (tiangolo)](https://x.com/tiangolo). * [Build a Secure Twilio Webhook with Python and FastAPI](https://www.twilio.com/blog/build-secure-twilio-webhook-python-fastapi) by [Twilio](https://www.twilio.com). - * [Using FastAPI with Django](https://www.stavros.io/posts/fastapi-with-django/) by [Stavros Korokithakis](https://twitter.com/Stavros). + * [Using FastAPI with Django](https://www.stavros.io/posts/fastapi-with-django/) by [Stavros Korokithakis](https://x.com/Stavros). * [Introducing Dispatch](https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072) by [Netflix](https://netflixtechblog.com/). * **Podcasts**: * [Build The Next Generation Of Python Web Applications With FastAPI - Episode 259 - interview to Sebastían Ramírez (tiangolo)](https://www.pythonpodcast.com/fastapi-web-application-framework-episode-259/) by [Podcast.`__init__`](https://www.pythonpodcast.com/). * **Talks**: - * [PyConBY 2020: Serve ML models easily with FastAPI](https://www.youtube.com/watch?v=z9K5pwb0rt8) by [Sebastián Ramírez (tiangolo)](https://twitter.com/tiangolo). - * [[VIRTUAL] Py.Amsterdam's flying Software Circus: Intro to FastAPI](https://www.youtube.com/watch?v=PnpTY1f4k2U) by [Sebastián Ramírez (tiangolo)](https://twitter.com/tiangolo). + * [PyConBY 2020: Serve ML models easily with FastAPI](https://www.youtube.com/watch?v=z9K5pwb0rt8) by [Sebastián Ramírez (tiangolo)](https://x.com/tiangolo). + * [[VIRTUAL] Py.Amsterdam's flying Software Circus: Intro to FastAPI](https://www.youtube.com/watch?v=PnpTY1f4k2U) by [Sebastián Ramírez (tiangolo)](https://x.com/tiangolo). * PR [#1467](https://github.com/tiangolo/fastapi/pull/1467). * Add translation to Chinese for [Python Types Intro - Python 类型提示简介](https://fastapi.tiangolo.com/zh/python-types/). PR [#1197](https://github.com/tiangolo/fastapi/pull/1197) by [@waynerv](https://github.com/waynerv). diff --git a/docs/en/docs/tutorial/body.md b/docs/en/docs/tutorial/body.md index 58e20f4c9..a820802f7 100644 --- a/docs/en/docs/tutorial/body.md +++ b/docs/en/docs/tutorial/body.md @@ -128,6 +128,14 @@ Inside of the function, you can access all the attributes of the model object di {* ../../docs_src/body/tutorial002_py310.py *} +/// info + +In Pydantic v1 the method was called `.dict()`, it was deprecated (but still supported) in Pydantic v2, and renamed to `.model_dump()`. + +The examples here use `.dict()` for compatibility with Pydantic v1, but you should use `.model_dump()` instead if you can use Pydantic v2. + +/// + ## Request body + path parameters { #request-body-path-parameters } You can declare path parameters and request body at the same time. diff --git a/docs/en/docs/tutorial/path-params.md b/docs/en/docs/tutorial/path-params.md index 7f15cb92b..457cc2713 100644 --- a/docs/en/docs/tutorial/path-params.md +++ b/docs/en/docs/tutorial/path-params.md @@ -56,8 +56,7 @@ But if you go to the browser at
@@ -32,12 +32,6 @@
- -
diff --git a/docs/es/docs/advanced/security/oauth2-scopes.md b/docs/es/docs/advanced/security/oauth2-scopes.md index 17f7b19ca..a8d2f20b6 100644 --- a/docs/es/docs/advanced/security/oauth2-scopes.md +++ b/docs/es/docs/advanced/security/oauth2-scopes.md @@ -4,9 +4,9 @@ Puedes usar scopes de OAuth2 directamente con **FastAPI**, están integrados par Esto te permitiría tener un sistema de permisos más detallado, siguiendo el estándar de OAuth2, integrado en tu aplicación OpenAPI (y la documentación de la API). -OAuth2 con scopes es el mecanismo usado por muchos grandes proveedores de autenticación, como Facebook, Google, GitHub, Microsoft, Twitter, etc. Lo usan para proporcionar permisos específicos a usuarios y aplicaciones. +OAuth2 con scopes es el mecanismo usado por muchos grandes proveedores de autenticación, como Facebook, Google, GitHub, Microsoft, X (Twitter), etc. Lo usan para proporcionar permisos específicos a usuarios y aplicaciones. -Cada vez que te "logueas con" Facebook, Google, GitHub, Microsoft, Twitter, esa aplicación está usando OAuth2 con scopes. +Cada vez que te "logueas con" Facebook, Google, GitHub, Microsoft, X (Twitter), esa aplicación está usando OAuth2 con scopes. En esta sección verás cómo manejar autenticación y autorización con el mismo OAuth2 con scopes en tu aplicación de **FastAPI**. diff --git a/docs/es/docs/async.md b/docs/es/docs/async.md index e3fd077c4..92a46ba9b 100644 --- a/docs/es/docs/async.md +++ b/docs/es/docs/async.md @@ -383,7 +383,7 @@ Pero antes de eso, manejar el código asíncrono era mucho más complejo y difí En versiones previas de Python, podrías haber usado hilos o Gevent. Pero el código es mucho más complejo de entender, depurar y razonar. -En versiones previas de NodeJS / JavaScript en el Navegador, habrías usado "callbacks". Lo que lleva al callback hell. +En versiones previas de NodeJS / JavaScript en el Navegador, habrías usado "callbacks". Lo que lleva al "callback hell". ## Coroutines diff --git a/docs/es/docs/deployment/cloud.md b/docs/es/docs/deployment/cloud.md index fe47d5dcf..f72b88c03 100644 --- a/docs/es/docs/deployment/cloud.md +++ b/docs/es/docs/deployment/cloud.md @@ -12,7 +12,4 @@ Y muestra su verdadero compromiso con FastAPI y su **comunidad** (tú), ya que n Podrías querer probar sus servicios y seguir sus guías: -* Platform.sh -* Porter -* Coherence * Render diff --git a/docs/es/docs/help-fastapi.md b/docs/es/docs/help-fastapi.md index 37f6b927d..fa559f490 100644 --- a/docs/es/docs/help-fastapi.md +++ b/docs/es/docs/help-fastapi.md @@ -20,9 +20,9 @@ Puedes suscribirte al (esporádico) boletín [**FastAPI and friends**](newslette * Cambios importantes 🚨 * Consejos y trucos ✅ -## Sigue a FastAPI en Twitter +## Sigue a FastAPI en X (Twitter) -Sigue a @fastapi en **Twitter** para obtener las últimas noticias sobre **FastAPI**. 🐦 +Sigue a @fastapi en **X (Twitter)** para obtener las últimas noticias sobre **FastAPI**. 🐦 ## Dale una estrella a **FastAPI** en GitHub @@ -47,19 +47,19 @@ Puedes: * Seguirme en **GitHub**. * Ver otros proyectos de Código Abierto que he creado y que podrían ayudarte. * Seguirme para ver cuándo creo un nuevo proyecto de Código Abierto. -* Seguirme en **Twitter** o Mastodon. +* Seguirme en **X (Twitter)** o Mastodon. * Contarme cómo usas FastAPI (me encanta oír eso). * Enterarte cuando hago anuncios o lanzo nuevas herramientas. - * También puedes seguir @fastapi en Twitter (una cuenta aparte). + * También puedes seguir @fastapi en X (Twitter) (una cuenta aparte). * Seguirme en **LinkedIn**. - * Enterarte cuando hago anuncios o lanzo nuevas herramientas (aunque uso Twitter más a menudo 🤷‍♂). + * Enterarte cuando hago anuncios o lanzo nuevas herramientas (aunque uso X (Twitter) más a menudo 🤷‍♂). * Leer lo que escribo (o seguirme) en **Dev.to** o **Medium**. * Leer otras ideas, artículos, y leer sobre las herramientas que he creado. * Seguirme para leer lo que publico nuevo. ## Twittea sobre **FastAPI** -Twittea sobre **FastAPI** y dime a mí y a otros por qué te gusta. 🎉 +Twittea sobre **FastAPI** y dime a mí y a otros por qué te gusta. 🎉 Me encanta escuchar cómo se está utilizando **FastAPI**, qué te ha gustado, en qué proyecto/empresa lo estás usando, etc. diff --git a/docs/es/docs/index.md b/docs/es/docs/index.md index c1da5d633..4c8c703b3 100644 --- a/docs/es/docs/index.md +++ b/docs/es/docs/index.md @@ -87,7 +87,7 @@ Las características clave son: "_Estoy súper emocionado con **FastAPI**. ¡Es tan divertido!_" -
Brian Okken - host del podcast Python Bytes (ref)
+
Brian Okken - host del podcast Python Bytes (ref)
--- @@ -101,7 +101,7 @@ Las características clave son: "_Nos hemos cambiado a **FastAPI** para nuestras **APIs** [...] Creo que te gustará [...]_" -
Ines Montani - Matthew Honnibal - fundadores de Explosion AI - creadores de spaCy (ref) - (ref)
+
Ines Montani - Matthew Honnibal - fundadores de Explosion AI - creadores de spaCy (ref) - (ref)
--- diff --git a/docs/es/docs/tutorial/path-params.md b/docs/es/docs/tutorial/path-params.md index 12a1b647b..426280902 100644 --- a/docs/es/docs/tutorial/path-params.md +++ b/docs/es/docs/tutorial/path-params.md @@ -56,8 +56,7 @@ Pero si vas al navegador en Gevent استفاده کنی. ولی کد خیلی پیچیده‌تر می‌شه برای فهمیدن، دیباگ کردن و فکر کردن بهش. -توی نسخه‌های قبلی NodeJS / جاوااسکریپت مرورگر، از "کال‌بک‌ها" استفاده می‌کردی. که می‌رسید به جهان کال‌بک‌ها. +توی نسخه‌های قبلی NodeJS / جاوااسکریپت مرورگر، از "کال‌بک‌ها" استفاده می‌کردی. که می‌رسید به "جهان کال‌بک‌ها". ## کروتین‌ها diff --git a/docs/fa/docs/index.md b/docs/fa/docs/index.md index 0aa0bec36..5c641b325 100644 --- a/docs/fa/docs/index.md +++ b/docs/fa/docs/index.md @@ -84,7 +84,7 @@ FastAPI یک وب فریم‌ورک مدرن و سریع (با کارایی با
"I’m over the moon excited about FastAPI. It’s so fun!"
-
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -98,7 +98,7 @@ FastAPI یک وب فریم‌ورک مدرن و سریع (با کارایی با
"We've switched over to FastAPI for our APIs [...] I think you'll like it [...]"
-
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/fr/docs/async.md b/docs/fr/docs/async.md index 0ff5fa5d1..1437ae517 100644 --- a/docs/fr/docs/async.md +++ b/docs/fr/docs/async.md @@ -372,7 +372,7 @@ Mais avant ça, gérer du code asynchrone était bien plus complexe et difficile Dans les versions précédentes de Python, vous auriez utilisé des *threads* ou Gevent. Mais le code aurait été bien plus difficile à comprendre, débugger, et concevoir. -Dans les versions précédentes de Javascript NodeJS / Navigateur, vous auriez utilisé des "callbacks". Menant potentiellement à ce que l'on appelle le "callback hell". +Dans les versions précédentes de Javascript NodeJS / Navigateur, vous auriez utilisé des "callbacks". Menant potentiellement à ce que l'on appelle le "callback hell". ## Coroutines diff --git a/docs/fr/docs/help-fastapi.md b/docs/fr/docs/help-fastapi.md index a365a8d3a..9b75f463b 100644 --- a/docs/fr/docs/help-fastapi.md +++ b/docs/fr/docs/help-fastapi.md @@ -33,18 +33,18 @@ Vous pouvez : * Me suivre sur **GitHub**. * Voir d'autres projets Open Source que j'ai créés et qui pourraient vous aider. * Suivez-moi pour voir quand je crée un nouveau projet Open Source. -* Me suivre sur **Twitter**. +* Me suivre sur **X (Twitter)**. * Dites-moi comment vous utilisez FastAPI (j'adore entendre ça). * Entendre quand je fais des annonces ou que je lance de nouveaux outils. * Vous connectez à moi sur **LinkedIn**. - * Etre notifié quand je fais des annonces ou que je lance de nouveaux outils (bien que j'utilise plus souvent Twitter 🤷‍♂). + * Etre notifié quand je fais des annonces ou que je lance de nouveaux outils (bien que j'utilise plus souvent X (Twitter) 🤷‍♂). * Lire ce que j’écris (ou me suivre) sur **Dev.to** ou **Medium**. * Lire d'autres idées, articles, et sur les outils que j'ai créés. * Suivez-moi pour lire quand je publie quelque chose de nouveau. ## Tweeter sur **FastAPI** -Tweetez à propos de **FastAPI** et faites-moi savoir, ainsi qu'aux autres, pourquoi vous aimez ça. 🎉 +Tweetez à propos de **FastAPI** et faites-moi savoir, ainsi qu'aux autres, pourquoi vous aimez ça. 🎉 J'aime entendre parler de l'utilisation du **FastAPI**, de ce que vous avez aimé dedans, dans quel projet/entreprise l'utilisez-vous, etc. diff --git a/docs/fr/docs/index.md b/docs/fr/docs/index.md index d25f7a939..015c9574a 100644 --- a/docs/fr/docs/index.md +++ b/docs/fr/docs/index.md @@ -87,7 +87,7 @@ Les principales fonctionnalités sont : "_Je suis très enthousiaste à propos de **FastAPI**. C'est un bonheur !_" -
Brian Okken - Auteur du podcast Python Bytes (ref)
+
Brian Okken - Auteur du podcast Python Bytes (ref)
--- @@ -101,7 +101,7 @@ Les principales fonctionnalités sont : "_Nous sommes passés à **FastAPI** pour nos **APIs** [...] Je pense que vous l'aimerez [...]_" -
Ines Montani - Matthew Honnibal - Fondateurs de Explosion AI - Créateurs de spaCy (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Fondateurs de Explosion AI - Créateurs de spaCy (ref) - (ref)
--- diff --git a/docs/he/docs/index.md b/docs/he/docs/index.md index bd166f205..14ea82f5e 100644 --- a/docs/he/docs/index.md +++ b/docs/he/docs/index.md @@ -88,7 +88,7 @@ FastAPI היא תשתית רשת מודרנית ומהירה (ביצועים ג "_I’m over the moon excited about **FastAPI**. It’s so fun!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -102,7 +102,7 @@ FastAPI היא תשתית רשת מודרנית ומהירה (ביצועים ג "_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/hu/docs/index.md b/docs/hu/docs/index.md index 45ff49c3b..f60b6b349 100644 --- a/docs/hu/docs/index.md +++ b/docs/hu/docs/index.md @@ -81,7 +81,7 @@ Kulcs funkciók: "_I’m over the moon excited about **FastAPI**. It’s so fun!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -95,7 +95,7 @@ Kulcs funkciók: "_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/id/docs/index.md b/docs/id/docs/index.md index 5fb0c4c9c..b29d42dfd 100644 --- a/docs/id/docs/index.md +++ b/docs/id/docs/index.md @@ -87,7 +87,7 @@ Fitur utama FastAPI: "_Saya sangat senang dengan **FastAPI**. Sangat menyenangkan!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -101,7 +101,7 @@ Fitur utama FastAPI: "_Kami sudah pindah ke **FastAPI** untuk **API** kami [...] Saya pikir kamu juga akan suka [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- "_Jika anda ingin membuat API Python siap pakai, saya merekomendasikan **FastAPI**. FastAPI **didesain indah**, **mudah digunakan** dan **sangat scalable**, FastAPI adalah **komponen kunci** di strategi pengembangan API pertama kami dan mengatur banyak otomatisasi dan service seperti TAC Engineer kami._" diff --git a/docs/id/docs/tutorial/path-params.md b/docs/id/docs/tutorial/path-params.md index 7c24de4d3..5ac6c8cd6 100644 --- a/docs/id/docs/tutorial/path-params.md +++ b/docs/id/docs/tutorial/path-params.md @@ -56,8 +56,7 @@ Tetapi jika di browser anda akses Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -96,7 +96,7 @@ Le sue caratteristiche principali sono: "_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/ja/docs/async.md b/docs/ja/docs/async.md index d1da1f82d..90a2e2ee5 100644 --- a/docs/ja/docs/async.md +++ b/docs/ja/docs/async.md @@ -338,7 +338,7 @@ async def read_burgers(): 以前のバージョンのPythonでは、スレッドやGeventが利用できました。しかし、コードは理解、デバック、そして、考察がはるかに複雑です。 -以前のバージョンのNodeJS / ブラウザJavaScriptでは、「コールバック」を使用していました。これは、コールバック地獄につながります。 +以前のバージョンのNodeJS / ブラウザJavaScriptでは、「コールバック」を使用していました。これは、「コールバック地獄」につながります。 ## コルーチン diff --git a/docs/ja/docs/help-fastapi.md b/docs/ja/docs/help-fastapi.md index d999fa127..8cf0c2163 100644 --- a/docs/ja/docs/help-fastapi.md +++ b/docs/ja/docs/help-fastapi.md @@ -31,18 +31,18 @@ GitHubでFastAPIを「Watch」できます (右上部のWatchボタンをクリ * **GitHub** でフォロー。 * 他のオープンソースプロジェクトを確認できます。何かの助けになるものが見つかるかもしれません。 * 新たなオープンソースプロジェクトを作成したときに通知されます。 -* **Twitter** でフォロー。 +* **X (Twitter)** でフォロー。 * FastAPIの使用用途を教えてください (聞いてみたいです)。 * 新たなツールの発表やリリースが聞けます。 * **Linkedin** でつながる。 - * 新たなツールの発表やリリースが聞けます (ただしTwitterの方が利用頻度が高いですが 🤷‍♂)。 + * 新たなツールの発表やリリースが聞けます (ただしX (Twitter)の方が利用頻度が高いですが 🤷‍♂)。 * **Dev.to****Medium** で著作物を読む (またはフォロー)。 * アイデアや作成ツールについての記事が読めます。 * 新規記事の執筆を通知してくれます。 ## **FastAPI** に関するツイート -**FastAPI** についてツイートし、開発者や他の人にどこが気に入ったのか教えてください。🎉 +**FastAPI** についてツイートし、開発者や他の人にどこが気に入ったのか教えてください。🎉 **FastAPI** がどのように使われ、どこが気に入られ、どんなプロジェクト/会社で使われているかなどについて知りたいです。 diff --git a/docs/ja/docs/index.md b/docs/ja/docs/index.md index 1ba85f8e0..c4ff6beeb 100644 --- a/docs/ja/docs/index.md +++ b/docs/ja/docs/index.md @@ -88,7 +88,7 @@ FastAPI は、Pythonの標準である型ヒントに基づいてPython 以降 "_私は**FastAPI**にワクワクしています。 めちゃくちゃ楽しいです!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -102,7 +102,7 @@ FastAPI は、Pythonの標準である型ヒントに基づいてPython 以降 "_私たちの**API**は**FastAPI**に切り替えました。[...] きっと気に入ると思います。 [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/ja/docs/tutorial/security/index.md b/docs/ja/docs/tutorial/security/index.md index 37b8bb958..14f2c8f44 100644 --- a/docs/ja/docs/tutorial/security/index.md +++ b/docs/ja/docs/tutorial/security/index.md @@ -22,7 +22,7 @@ OAuth2は、認証と認可を処理するためのいくつかの方法を定 これには「サードパーティ」を使用して認証する方法が含まれています。 -これが、「Facebook、Google、Twitter、GitHubを使ってログイン」を使用したすべてのシステムの背後で使われている仕組みです。 +これが、「Facebook、Google、X (Twitter)、GitHubを使ってログイン」を使用したすべてのシステムの背後で使われている仕組みです。 ### OAuth 1 @@ -79,7 +79,7 @@ OpenAPIでは、以下のセキュリティスキームを定義しています: * HTTP Basic認証 * HTTP ダイジェスト認証など * `oauth2`: OAuth2のセキュリティ処理方法(「フロー」と呼ばれます)のすべて。 - * これらのフローのいくつかは、OAuth 2.0認証プロバイダ(Google、Facebook、Twitter、GitHubなど)を構築するのに適しています。 + * これらのフローのいくつかは、OAuth 2.0認証プロバイダ(Google、Facebook、X (Twitter)、GitHubなど)を構築するのに適しています。 * `implicit` * `clientCredentials` * `authorizationCode` @@ -91,7 +91,7 @@ OpenAPIでは、以下のセキュリティスキームを定義しています: /// tip | 豆知識 -Google、Facebook、Twitter、GitHubなど、他の認証/認可プロバイダを統合することも可能で、比較的簡単です。 +Google、Facebook、X (Twitter)、GitHubなど、他の認証/認可プロバイダを統合することも可能で、比較的簡単です。 最も複雑な問題は、それらのような認証/認可プロバイダを構築することですが、**FastAPI**は、あなたのために重い仕事をこなしながら、それを簡単に行うためのツールを提供します。 diff --git a/docs/ja/docs/tutorial/security/oauth2-jwt.md b/docs/ja/docs/tutorial/security/oauth2-jwt.md index 4859819cc..599fc7b06 100644 --- a/docs/ja/docs/tutorial/security/oauth2-jwt.md +++ b/docs/ja/docs/tutorial/security/oauth2-jwt.md @@ -272,4 +272,4 @@ OAuth2には、「スコープ」という概念があります。 また、OAuth2のような安全で標準的なプロトコルを比較的簡単な方法で使用できるだけではなく、実装することもできます。 -OAuth2の「スコープ」を使って、同じ基準でより細かい権限システムを実現する方法については、**高度なユーザーガイド**で詳しく説明しています。スコープ付きのOAuth2は、Facebook、Google、GitHub、Microsoft、Twitterなど、多くの大手認証プロバイダが、サードパーティのアプリケーションと自社のAPIとのやり取りをユーザーに代わって認可するために使用している仕組みです。 +OAuth2の「スコープ」を使って、同じ基準でより細かい権限システムを実現する方法については、**高度なユーザーガイド**で詳しく説明しています。スコープ付きのOAuth2は、Facebook、Google、GitHub、Microsoft、X (Twitter)など、多くの大手認証プロバイダが、サードパーティのアプリケーションと自社のAPIとのやり取りをユーザーに代わって認可するために使用している仕組みです。 diff --git a/docs/ko/docs/async.md b/docs/ko/docs/async.md index fa0d20488..ec503d540 100644 --- a/docs/ko/docs/async.md +++ b/docs/ko/docs/async.md @@ -349,7 +349,7 @@ FastAPI를 사용하지 않더라도, 높은 호환성 및 Gevent를 사용할 수 있을 것입니다. 하지만 코드를 이해하고, 디버깅하고, 이에 대해 생각하는게 훨씬 복잡합니다. -예전 버전의 NodeJS / 브라우저 자바스크립트라면, "콜백 함수"를 사용했을 것입니다. 그리고 이로 인해 콜백 지옥에 빠지게 될 수 있습니다. +예전 버전의 NodeJS / 브라우저 자바스크립트라면, "콜백 함수"를 사용했을 것입니다. 그리고 이로 인해 "콜백 지옥"에 빠지게 될 수 있습니다. ## 코루틴 diff --git a/docs/ko/docs/deployment/cloud.md b/docs/ko/docs/deployment/cloud.md index 2d6938e20..dbc814bbd 100644 --- a/docs/ko/docs/deployment/cloud.md +++ b/docs/ko/docs/deployment/cloud.md @@ -10,7 +10,4 @@ 이는 FastAPI와 **커뮤니티** (여러분)에 대한 진정한 헌신을 보여줍니다. 그들은 여러분에게 **좋은 서비스**를 제공할 뿐 만이 아니라 여러분이 **훌륭하고 건강한 프레임워크인** FastAPI 를 사용하길 원하기 때문입니다. 🙇 -아래와 같은 서비스를 사용해보고 각 서비스의 가이드를 따를 수도 있습니다: - -* Platform.sh -* Porter +아래와 같은 서비스를 사용해보고 각 서비스의 가이드를 따를 수도 있습니다. diff --git a/docs/ko/docs/help-fastapi.md b/docs/ko/docs/help-fastapi.md index 06435d4bb..b65ef959c 100644 --- a/docs/ko/docs/help-fastapi.md +++ b/docs/ko/docs/help-fastapi.md @@ -22,7 +22,7 @@ FastAPI, 다른 사용자, 개발자를 응원하고 싶으신가요? ## 트위터에서 FastAPI 팔로우하기 -**Twitter**의 @fastapi를 팔로우하여 **FastAPI** 에 대한 최신 뉴스를 얻을 수 있습니다. 🐦 +**X (Twitter)**의 @fastapi를 팔로우하여 **FastAPI** 에 대한 최신 뉴스를 얻을 수 있습니다. 🐦 ## Star **FastAPI** in GitHub @@ -47,19 +47,19 @@ GitHub에서 FastAPI를 "watch"할 수 있습니다 (오른쪽 상단 watch 버 * **GitHub**에서 팔로우하기.. * 당신에게 도움이 될 저의 다른 오픈소스 프로젝트를 확인하십시오. * 새로운 오픈소스 프로젝트를 만들었을 때 확인하려면 팔로우 하십시오. -* **Twitter** 또는 Mastodon에서 팔로우하기. +* **X (Twitter)** 또는 Mastodon에서 팔로우하기. * FastAPI의 사용 용도를 알려주세요 (그것을 듣는 것을 좋아합니다). * 발표나 새로운 툴 출시 소식을 받아보십시오. - * **Twitter**의 @fastapi를 팔로우 (별도 계정에서) 할 수 있습니다. + * **X (Twitter)**의 @fastapi를 팔로우 (별도 계정에서) 할 수 있습니다. * **LinkedIn**에서 팔로우하기.. - * 새로운 툴의 발표나 출시 소식을 받아보십시오. (단, Twitter를 더 자주 사용합니다 🤷‍♂). + * 새로운 툴의 발표나 출시 소식을 받아보십시오. (단, X (Twitter)를 더 자주 사용합니다 🤷‍♂). * **Dev.to** 또는 **Medium**에서 제가 작성한 내용을 읽어 보십시오 (또는 팔로우). * 다른 기사나 아이디어들을 읽고, 제가 만들어왔던 툴에 대해서도 읽으십시오. * 새로운 기사를 읽기 위해 팔로우 하십시오. ## **FastAPI**에 대한 트윗 -**FastAPI**에 대해 트윗 하고 FastAPI가 마음에 드는 이유를 알려주세요. 🎉 +**FastAPI**에 대해 트윗 하고 FastAPI가 마음에 드는 이유를 알려주세요. 🎉 **FastAPI**가 어떻게 사용되고 있는지, 어떤 점이 마음에 들었는지, 어떤 프로젝트/회사에서 사용하고 있는지 등에 대해 듣고 싶습니다. diff --git a/docs/ko/docs/index.md b/docs/ko/docs/index.md index 0df2000fa..fc0502052 100644 --- a/docs/ko/docs/index.md +++ b/docs/ko/docs/index.md @@ -88,7 +88,7 @@ FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트 "_**FastAPI**가 너무 좋아서 구름 위를 걷는듯 합니다. 정말 즐겁습니다!_" -
Brian Okken - Python Bytes 팟캐스트 호스트 (ref)
+
Brian Okken - Python Bytes 팟캐스트 호스트 (ref)
--- @@ -102,7 +102,7 @@ FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트 "_우리 **API**를 **FastAPI**로 바꿨습니다 [...] 아마 여러분도 좋아하실 것입니다 [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI 설립자 - spaCy 제작자 (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI 설립자 - spaCy 제작자 (ref) - (ref)
--- diff --git a/docs/ko/docs/tutorial/security/oauth2-jwt.md b/docs/ko/docs/tutorial/security/oauth2-jwt.md index d8bac8346..8d27856e8 100644 --- a/docs/ko/docs/tutorial/security/oauth2-jwt.md +++ b/docs/ko/docs/tutorial/security/oauth2-jwt.md @@ -270,4 +270,4 @@ OAuth2는 "스코프(scopes)" 라는 개념을 갖고 있습니다. 그리고 OAuth2와 같은 표준 프로토콜을 비교적 간단한 방법으로 구현하고 사용할 수 있습니다. -더 세분화된 권한 체계를 위해 OAuth2의 "스코프"를 사용하는 방법은 **심화 사용자 안내서**에서 더 자세히 배울 수 있습니다. OAuth2의 스코프는 제3자 애플리케이션이 사용자를 대신해 그들의 API와 상호작용하도록 권한을 부여하기 위해, Facebook, Google, GitHub, Microsoft, Twitter 등의 많은 대형 인증 제공업체들이 사용하는 메커니즘입니다. +더 세분화된 권한 체계를 위해 OAuth2의 "스코프"를 사용하는 방법은 **심화 사용자 안내서**에서 더 자세히 배울 수 있습니다. OAuth2의 스코프는 제3자 애플리케이션이 사용자를 대신해 그들의 API와 상호작용하도록 권한을 부여하기 위해, Facebook, Google, GitHub, Microsoft, X (Twitter) 등의 많은 대형 인증 제공업체들이 사용하는 메커니즘입니다. diff --git a/docs/nl/docs/index.md b/docs/nl/docs/index.md index 32b20e31e..8d4ad92c7 100644 --- a/docs/nl/docs/index.md +++ b/docs/nl/docs/index.md @@ -87,7 +87,7 @@ De belangrijkste kenmerken zijn: "_Ik ben super enthousiast over **FastAPI**. Het is zo leuk!_" -
Brian Okken - Python Bytes podcast presentator (ref)
+
Brian Okken - Python Bytes podcast presentator (ref)
--- @@ -101,7 +101,7 @@ De belangrijkste kenmerken zijn: "_We zijn overgestapt naar **FastAPI** voor onze **API's** [...] Het gaat jou vast ook bevallen [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI oprichters - spaCy ontwikkelaars (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI oprichters - spaCy ontwikkelaars (ref) - (ref)
--- diff --git a/docs/pl/docs/help-fastapi.md b/docs/pl/docs/help-fastapi.md index 3ea328dc2..05e491d55 100644 --- a/docs/pl/docs/help-fastapi.md +++ b/docs/pl/docs/help-fastapi.md @@ -20,9 +20,9 @@ Możesz zapisać się do rzadkiego [newslettera o **FastAPI i jego przyjaciołac * Przełomowymi zmianami 🚨 * Poradami i sztuczkami ✅ -## Śledź FastAPI na Twitterze +## Śledź FastAPI na X (Twitter) -Śledź @fastapi na **Twitterze** aby być na bieżąco z najnowszymi wiadomościami o **FastAPI**. 🐦 +Śledź @fastapi na **X (Twitter)** aby być na bieżąco z najnowszymi wiadomościami o **FastAPI**. 🐦 ## Dodaj gwiazdkę **FastAPI** na GitHubie @@ -47,10 +47,10 @@ Możesz: * Śledzić mnie na **GitHubie**. * Zobacz inne projekty open source, które stworzyłem, a mogą być dla Ciebie pomocne. * Śledź mnie, aby dostać powiadomienie, gdy utworzę nowy projekt open source. -* Śledzić mnie na **Twitterze** lub na Mastodonie. +* Śledzić mnie na **X (Twitter)** lub na Mastodonie. * Napisz mi, w jaki sposób korzystasz z FastAPI (uwielbiam o tym czytać). * Dowiedz się, gdy ogłoszę coś nowego lub wypuszczę nowe narzędzia. - * Możesz także śledzić @fastapi na Twitterze (to oddzielne konto). + * Możesz także śledzić @fastapi na X (Twitter) (to oddzielne konto). * Nawiąż ze mną kontakt na **Linkedinie**. * Dowiedz się, gdy ogłoszę coś nowego lub wypuszczę nowe narzędzia (chociaż częściej korzystam z Twittera 🤷‍♂). * Czytaj moje posty (lub śledź mnie) na **Dev.to** lub na **Medium**. @@ -59,7 +59,7 @@ Możesz: ## Napisz tweeta o **FastAPI** -Napisz tweeta o **FastAPI** i powiedz czemu Ci się podoba. 🎉 +Napisz tweeta o **FastAPI** i powiedz czemu Ci się podoba. 🎉 Uwielbiam czytać w jaki sposób **FastAPI** jest używane, co Ci się w nim podobało, w jakim projekcie/firmie go używasz itp. diff --git a/docs/pl/docs/index.md b/docs/pl/docs/index.md index 0e13d2631..976d610d4 100644 --- a/docs/pl/docs/index.md +++ b/docs/pl/docs/index.md @@ -87,7 +87,7 @@ Kluczowe cechy: "_I’m over the moon excited about **FastAPI**. It’s so fun!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -101,7 +101,7 @@ Kluczowe cechy: "_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/pt/docs/advanced/security/oauth2-scopes.md b/docs/pt/docs/advanced/security/oauth2-scopes.md index 1d53f42d8..07b345945 100644 --- a/docs/pt/docs/advanced/security/oauth2-scopes.md +++ b/docs/pt/docs/advanced/security/oauth2-scopes.md @@ -4,9 +4,9 @@ Você pode utilizar escopos do OAuth2 diretamente com o **FastAPI**, eles são i Isso permitiria que você tivesse um sistema de permissionamento mais refinado, seguindo o padrão do OAuth2 integrado na sua aplicação OpenAPI (e as documentações da API). -OAuth2 com escopos é o mecanismo utilizado por muitos provedores de autenticação, como o Facebook, Google, GitHub, Microsoft, Twitter, etc. Eles utilizam isso para prover permissões específicas para os usuários e aplicações. +OAuth2 com escopos é o mecanismo utilizado por muitos provedores de autenticação, como o Facebook, Google, GitHub, Microsoft, X (Twitter), etc. Eles utilizam isso para prover permissões específicas para os usuários e aplicações. -Toda vez que você "se autentica com" Facebook, Google, GitHub, Microsoft, Twitter, aquela aplicação está utilizando o OAuth2 com escopos. +Toda vez que você "se autentica com" Facebook, Google, GitHub, Microsoft, X (Twitter), aquela aplicação está utilizando o OAuth2 com escopos. Nesta seção, você verá como gerenciar a autenticação e autorização com os mesmos escopos do OAuth2 em sua aplicação **FastAPI**. diff --git a/docs/pt/docs/async.md b/docs/pt/docs/async.md index 4425eba77..c70924ea5 100644 --- a/docs/pt/docs/async.md +++ b/docs/pt/docs/async.md @@ -348,7 +348,7 @@ Mas antes disso, controlar código assíncrono era bem mais complexo e difícil. Nas versões anteriores do Python, você poderia utilizar threads ou Gevent. Mas o código é bem mais complexo de entender, debugar, e pensar sobre. -Nas versões anteriores do NodeJS / Navegador JavaScript, você utilizaria "callbacks". O que leva ao inferno do callback. +Nas versões anteriores do NodeJS / Navegador JavaScript, você utilizaria "callbacks". O que leva ao "inferno do callback". ## Corrotinas diff --git a/docs/pt/docs/deployment/cloud.md b/docs/pt/docs/deployment/cloud.md index e6522f50f..fc490db4d 100644 --- a/docs/pt/docs/deployment/cloud.md +++ b/docs/pt/docs/deployment/cloud.md @@ -10,8 +10,4 @@ Alguns provedores de nuvem ✨ [**patrocinam o FastAPI**](../help-fastapi.md#spo E isso mostra seu verdadeiro comprometimento com o FastAPI e sua **comunidade** (você), pois eles não querem apenas fornecer a você um **bom serviço**, mas também querem ter certeza de que você tenha uma **estrutura boa e saudável**, o FastAPI. 🙇 -Talvez você queira experimentar os serviços deles e seguir os guias: - -* Platform.sh -* Porter -* Coherence +Talvez você queira experimentar os serviços deles e seguir os guias. diff --git a/docs/pt/docs/help-fastapi.md b/docs/pt/docs/help-fastapi.md index 3d6e1f9d2..0de1ed648 100644 --- a/docs/pt/docs/help-fastapi.md +++ b/docs/pt/docs/help-fastapi.md @@ -20,9 +20,9 @@ Você pode se inscrever (pouco frequente) [**FastAPI e amigos** newsletter](news * Mudanças de última hora 🚨 * Truques e dicas ✅ -## Siga o FastAPI no twitter +## Siga o FastAPI no X (Twitter) -Siga @fastapi no **Twitter** para receber as últimas notícias sobre o **FastAPI**. 🐦 +Siga @fastapi no **X (Twitter)** para receber as últimas notícias sobre o **FastAPI**. 🐦 ## Favorite o **FastAPI** no GitHub @@ -47,19 +47,19 @@ Você pode: * Me siga no **GitHub**. * Ver também outros projetos Open Source criados por mim que podem te ajudar. * Me seguir para saber quando um novo projeto Open Source for criado. -* Me siga no **Twitter**. +* Me siga no **X (Twitter)**. * Me dizer o motivo pelo o qual você está usando o FastAPI(Adoro ouvir esse tipo de comentário). * Saber quando eu soltar novos anúncios ou novas ferramentas. - * Também é possivel seguir o @fastapi no Twitter (uma conta aparte). + * Também é possivel seguir o @fastapi no X (Twitter) (uma conta aparte). * Conect-se comigo no **Linkedin**. - * Saber quando eu fizer novos anúncios ou novas ferramentas (apesar de que uso o twitter com mais frequência 🤷‍♂). + * Saber quando eu fizer novos anúncios ou novas ferramentas (apesar de que uso o X (Twitter) com mais frequência 🤷‍♂). * Ler meus artigos (ou me seguir) no **Dev.to** ou no **Medium**. * Ficar por dentro de novas ideias, artigos, e ferramentas criadas por mim. * Me siga para saber quando eu publicar algo novo. ## Tweete sobre **FastAPI** -Tweete sobre o **FastAPI** e compartilhe comigo e com os outros o porque de gostar do FastAPI. 🎉 +Tweete sobre o **FastAPI** e compartilhe comigo e com os outros o porque de gostar do FastAPI. 🎉 Adoro ouvir sobre como o **FastAPI** é usado, o que você gosta nele, em qual projeto/empresa está sendo usado, etc. diff --git a/docs/pt/docs/index.md b/docs/pt/docs/index.md index 9f08d5224..ce9929bf4 100644 --- a/docs/pt/docs/index.md +++ b/docs/pt/docs/index.md @@ -87,7 +87,7 @@ Os recursos chave são: "*Estou extremamente entusiasmado com o **FastAPI**. É tão divertido!*" -
Brian Okken - Python Bytes podcaster (ref)
+
Brian Okken - Python Bytes podcaster (ref)
--- @@ -101,7 +101,7 @@ Os recursos chave são: "*Nós trocamos nossas **APIs** por **FastAPI** [...] Acredito que vocês gostarão dele [...]*" -
Ines Montani - Matthew Honnibal - fundadores da Explosion AI - criadores da spaCy (ref) - (ref)
+
Ines Montani - Matthew Honnibal - fundadores da Explosion AI - criadores da spaCy (ref) - (ref)
--- diff --git a/docs/pt/docs/tutorial/security/index.md b/docs/pt/docs/tutorial/security/index.md index b4440ec04..2ebb87fcd 100644 --- a/docs/pt/docs/tutorial/security/index.md +++ b/docs/pt/docs/tutorial/security/index.md @@ -22,7 +22,7 @@ Ela é bastante extensiva na especificação e cobre casos de uso muito complexo Ela inclui uma forma para autenticação usando “third party”/aplicações de terceiros. -Isso é o que todos os sistemas com “Login with Facebook, Google, Twitter, GitHub” usam por baixo. +Isso é o que todos os sistemas com “Login with Facebook, Google, X (Twitter), GitHub” usam por baixo. ### OAuth 1 @@ -79,7 +79,7 @@ OpenAPI define os seguintes esquemas de segurança: * HTTP Basic authentication. * HTTP Digest, etc. * `oauth2`: todas as formas do OAuth2 para lidar com segurança (chamados "fluxos"). - * Vários desses fluxos são apropriados para construir um provedor de autenticação OAuth2 (como Google, Facebook, Twitter, GitHub, etc): + * Vários desses fluxos são apropriados para construir um provedor de autenticação OAuth2 (como Google, Facebook, X (Twitter), GitHub, etc): * `implicit` * `clientCredentials` * `authorizationCode` @@ -91,7 +91,7 @@ OpenAPI define os seguintes esquemas de segurança: /// tip | Dica -Integração com outros provedores de autenticação/autorização como Google, Facebook, Twitter, GitHub, etc. é bem possível e relativamente fácil. +Integração com outros provedores de autenticação/autorização como Google, Facebook, X (Twitter), GitHub, etc. é bem possível e relativamente fácil. O problema mais complexo é criar um provedor de autenticação/autorização como eles, mas o FastAPI dá a você ferramentas para fazer isso facilmente, enquanto faz o trabalho pesado para você. diff --git a/docs/pt/docs/tutorial/security/oauth2-jwt.md b/docs/pt/docs/tutorial/security/oauth2-jwt.md index 4b99c4c59..7d80d12fa 100644 --- a/docs/pt/docs/tutorial/security/oauth2-jwt.md +++ b/docs/pt/docs/tutorial/security/oauth2-jwt.md @@ -271,4 +271,4 @@ Mas ele fornece as ferramentas para simplificar o processo o máximo possível, E você pode usar e implementar protocolos padrão seguros, como o OAuth2, de uma maneira relativamente simples. -Você pode aprender mais no **Guia Avançado do Usuário** sobre como usar os "scopes" do OAuth2 para um sistema de permissões mais refinado, seguindo esses mesmos padrões. O OAuth2 com scopes é o mecanismo usado por muitos provedores grandes de autenticação, como o Facebook, Google, GitHub, Microsoft, Twitter, etc. para autorizar aplicativos de terceiros a interagir com suas APIs em nome de seus usuários. +Você pode aprender mais no **Guia Avançado do Usuário** sobre como usar os "scopes" do OAuth2 para um sistema de permissões mais refinado, seguindo esses mesmos padrões. O OAuth2 com scopes é o mecanismo usado por muitos provedores grandes de autenticação, como o Facebook, Google, GitHub, Microsoft, X (Twitter), etc. para autorizar aplicativos de terceiros a interagir com suas APIs em nome de seus usuários. diff --git a/docs/ru/docs/async.md b/docs/ru/docs/async.md index 6c5d982df..813836d36 100644 --- a/docs/ru/docs/async.md +++ b/docs/ru/docs/async.md @@ -420,7 +420,7 @@ Starlette (и **FastAPI**) основаны на "обратные вызовы". Что выливалось в -ад обратных вызовов. +"ад обратных вызовов". ## Сопрограммы diff --git a/docs/ru/docs/help-fastapi.md b/docs/ru/docs/help-fastapi.md index 474b3d689..2f73c3c10 100644 --- a/docs/ru/docs/help-fastapi.md +++ b/docs/ru/docs/help-fastapi.md @@ -20,9 +20,9 @@ * Исправлениях 🚨 * Подсказках и хитростях ✅ -## Подписаться на FastAPI в Twitter +## Подписаться на FastAPI в X (Twitter) -Подписаться на @fastapi в **Twitter** для получения наисвежайших новостей о **FastAPI**. 🐦 +Подписаться на @fastapi в **X (Twitter)** для получения наисвежайших новостей о **FastAPI**. 🐦 ## Добавить **FastAPI** звезду на GitHub @@ -47,19 +47,19 @@ * Подписаться на меня на **GitHub**. * Посмотреть другие мои проекты с открытым кодом, которые могут быть полезны Вам. * Подписавшись на меня Вы сможете получать уведомления, что я создал новый проект с открытым кодом,. -* Подписаться на меня в **Twitter** или в Mastodon. +* Подписаться на меня в **X (Twitter)** или в Mastodon. * Поделиться со мной, как Вы используете FastAPI (я обожаю читать про это). * Получать уведомления, когда я делаю объявления и представляю новые инструменты. - * Вы также можете подписаться на @fastapi в Twitter (это отдельный аккаунт). + * Вы также можете подписаться на @fastapi в X (Twitter) (это отдельный аккаунт). * Подписаться на меня в **Linkedin**. - * Получать уведомления, когда я делаю объявления и представляю новые инструменты (правда чаще всего я использую Twitter 🤷‍♂). + * Получать уведомления, когда я делаю объявления и представляю новые инструменты (правда чаще всего я использую X (Twitter) 🤷‍♂). * Читать, что я пишу (или подписаться на меня) в **Dev.to** или в **Medium**. * Читать другие идеи, статьи и читать об инструментах созданных мной. * Подпишитесь на меня, чтобы прочитать, когда я опубликую что-нибудь новое. -## Оставить сообщение в Twitter о **FastAPI** +## Оставить сообщение в X (Twitter) о **FastAPI** -Оставьте сообщение в Twitter о **FastAPI** и позвольте мне и другим узнать - почему он Вам нравится. 🎉 +Оставьте сообщение в X (Twitter) о **FastAPI** и позвольте мне и другим узнать - почему он Вам нравится. 🎉 Я люблю узнавать о том, как **FastAPI** используется, что Вам понравилось в нём, в каких проектах/компаниях Вы используете его и т.п. diff --git a/docs/ru/docs/index.md b/docs/ru/docs/index.md index a9546cf1e..692c03ecb 100644 --- a/docs/ru/docs/index.md +++ b/docs/ru/docs/index.md @@ -87,7 +87,7 @@ FastAPI — это современный, быстрый (высокопрои "_Я в полном восторге от **FastAPI**. Это так весело!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -101,7 +101,7 @@ FastAPI — это современный, быстрый (высокопрои "_Мы перешли на **FastAPI** для наших **API** [...] Я думаю, вам тоже понравится [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/ru/docs/tutorial/security/index.md b/docs/ru/docs/tutorial/security/index.md index e4969c4cf..8fb4bf24f 100644 --- a/docs/ru/docs/tutorial/security/index.md +++ b/docs/ru/docs/tutorial/security/index.md @@ -22,7 +22,7 @@ OAuth2 - это протокол, который определяет неско OAuth2 включает в себя способы аутентификации с использованием "третьей стороны". -Это то, что используют под собой все кнопки "вход с помощью Facebook, Google, Twitter, GitHub" на страницах авторизации. +Это то, что используют под собой все кнопки "вход с помощью Facebook, Google, X (Twitter), GitHub" на страницах авторизации. ### OAuth 1 @@ -79,7 +79,7 @@ OpenAPI может использовать следующие схемы авт * Базовая аутентификация по протоколу HTTP. * HTTP Digest и т.д. * `oauth2`: все способы обеспечения безопасности OAuth2 называемые "потоки" (англ. "flows"). - * Некоторые из этих "потоков" подходят для реализации аутентификации через сторонний сервис использующий OAuth 2.0 (например, Google, Facebook, Twitter, GitHub и т.д.): + * Некоторые из этих "потоков" подходят для реализации аутентификации через сторонний сервис использующий OAuth 2.0 (например, Google, Facebook, X (Twitter), GitHub и т.д.): * `implicit` * `clientCredentials` * `authorizationCode` @@ -91,7 +91,7 @@ OpenAPI может использовать следующие схемы авт /// tip | Подсказка -Интеграция сторонних сервисов для аутентификации/авторизации таких как Google, Facebook, Twitter, GitHub и т.д. осуществляется достаточно легко. +Интеграция сторонних сервисов для аутентификации/авторизации таких как Google, Facebook, X (Twitter), GitHub и т.д. осуществляется достаточно легко. Самой сложной проблемой является создание такого провайдера аутентификации/авторизации, но **FastAPI** предоставляет вам инструменты, позволяющие легко это сделать, выполняя при этом всю тяжелую работу за вас. diff --git a/docs/ru/docs/tutorial/security/oauth2-jwt.md b/docs/ru/docs/tutorial/security/oauth2-jwt.md index 1195fad21..57f973d2c 100644 --- a/docs/ru/docs/tutorial/security/oauth2-jwt.md +++ b/docs/ru/docs/tutorial/security/oauth2-jwt.md @@ -258,4 +258,4 @@ Password: `secret` При этом вы можете использовать и реализовывать безопасные стандартные протоколы, такие как OAuth2, относительно простым способом. -В **Руководстве пользователя** вы можете узнать больше о том, как использовать "диапазоны" ("`scopes`") OAuth2 для создания более точно настроенной системы разрешений в соответствии с теми же стандартами. OAuth2 с диапазонами - это механизм, используемый многими крупными провайдерами сервиса аутентификации, такими как Facebook, Google, GitHub, Microsoft, Twitter и др., для авторизации сторонних приложений на взаимодействие с их API от имени их пользователей. +В **Руководстве пользователя** вы можете узнать больше о том, как использовать "диапазоны" ("`scopes`") OAuth2 для создания более точно настроенной системы разрешений в соответствии с теми же стандартами. OAuth2 с диапазонами - это механизм, используемый многими крупными провайдерами сервиса аутентификации, такими как Facebook, Google, GitHub, Microsoft, X (Twitter) и др., для авторизации сторонних приложений на взаимодействие с их API от имени их пользователей. diff --git a/docs/tr/docs/async.md b/docs/tr/docs/async.md index 558a79cb7..88fd763fc 100644 --- a/docs/tr/docs/async.md +++ b/docs/tr/docs/async.md @@ -346,7 +346,7 @@ Ancak bundan önce, asenkron kodu işlemek oldukça karmaşık ve zordu. Python'un önceki sürümlerinde, threadlerı veya Gevent kullanıyor olabilirdin. Ancak kodu anlamak, hata ayıklamak ve düşünmek çok daha karmaşık olurdu. -NodeJS / Browser JavaScript'in önceki sürümlerinde, "callback" kullanırdınız. Bu da callbacks cehennemine yol açar. +NodeJS / Browser JavaScript'in önceki sürümlerinde, "callback" kullanırdınız. Bu da "callbacks cehennemine" yol açar. ## Coroutine'ler diff --git a/docs/tr/docs/deployment/cloud.md b/docs/tr/docs/deployment/cloud.md index 5639567d4..4f82e9d0b 100644 --- a/docs/tr/docs/deployment/cloud.md +++ b/docs/tr/docs/deployment/cloud.md @@ -10,8 +10,4 @@ Bazı bulut sağlayıcılar ✨ [**FastAPI destekçileridir**](../help-fastapi.m Ayrıca, size **iyi servisler** sağlamakla kalmayıp, **iyi ve sağlıklı bir framework** olan FastAPI'a bağlılıklarını gösterir. -Bu hizmetleri denemek ve kılavuzlarını incelemek isteyebilirsiniz: - -* Platform.sh -* Porter -* Coherence +Bu hizmetleri denemek ve kılavuzlarını incelemek isteyebilirsiniz. diff --git a/docs/tr/docs/index.md b/docs/tr/docs/index.md index f666e2d06..c7a2b2fbd 100644 --- a/docs/tr/docs/index.md +++ b/docs/tr/docs/index.md @@ -87,7 +87,7 @@ Temel özellikleri şunlardır: "_**FastAPI** için ayın üzerindeymişcesine heyecanlıyım. Çok eğlenceli!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -101,7 +101,7 @@ Temel özellikleri şunlardır: "_**API** servislerimizi **FastAPI**'a taşıdık [...] Sizin de beğeneceğinizi düşünüyoruz. [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI kurucuları - spaCy yaratıcıları (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI kurucuları - spaCy yaratıcıları (ref) - (ref)
--- diff --git a/docs/tr/docs/tutorial/path-params.md b/docs/tr/docs/tutorial/path-params.md index e1707a5d9..408dd25ca 100644 --- a/docs/tr/docs/tutorial/path-params.md +++ b/docs/tr/docs/tutorial/path-params.md @@ -56,8 +56,7 @@ Eğer tarayıcınızda Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -96,7 +96,7 @@ FastAPI - це сучасний, швидкий (високопродуктив "_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/uk/docs/tutorial/path-params.md b/docs/uk/docs/tutorial/path-params.md index e7df1f19a..da4ff2f9e 100644 --- a/docs/uk/docs/tutorial/path-params.md +++ b/docs/uk/docs/tutorial/path-params.md @@ -56,8 +56,7 @@ "item_id" ], "msg": "Input should be a valid integer, unable to parse string as an integer", - "input": "foo", - "url": "https://errors.pydantic.dev/2.1/v/int_parsing" + "input": "foo" } ] } diff --git a/docs/uk/docs/tutorial/query-params.md b/docs/uk/docs/tutorial/query-params.md index 16bb42af3..4b75ecab9 100644 --- a/docs/uk/docs/tutorial/query-params.md +++ b/docs/uk/docs/tutorial/query-params.md @@ -151,8 +151,7 @@ http://127.0.0.1:8000/items/foo-item "needy" ], "msg": "Field required", - "input": null, - "url": "https://errors.pydantic.dev/2.1/v/missing" + "input": null } ] } diff --git a/docs/vi/docs/deployment/cloud.md b/docs/vi/docs/deployment/cloud.md index 9ab72769d..1d76522c3 100644 --- a/docs/vi/docs/deployment/cloud.md +++ b/docs/vi/docs/deployment/cloud.md @@ -11,7 +11,4 @@ Thêm nữa, điều này cũng thể hiện cam kết thực sự của họ đ Bạn có thể thử các dịch vụ của họ và làm theo hướng dẫn của họ: -* Platform.sh -* Porter -* Coherence * Render diff --git a/docs/vi/docs/index.md b/docs/vi/docs/index.md index 5c6b7e8a4..e7df2bf72 100644 --- a/docs/vi/docs/index.md +++ b/docs/vi/docs/index.md @@ -87,7 +87,7 @@ Những tính năng như: "_Tôi vô cùng hào hứng về **FastAPI**. Nó rất thú vị_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -101,8 +101,8 @@ Những tính năng như: "_Chúng tôi đã chuyển qua **FastAPI cho **APIs** của chúng tôi [...] Tôi nghĩ bạn sẽ thích nó [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
-
Ines Montani - Matthew Honnibal - nhà sáng lập Explosion AI - người tạo ra spaCy (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - nhà sáng lập Explosion AI - người tạo ra spaCy (ref) - (ref)
--- diff --git a/docs/yo/docs/index.md b/docs/yo/docs/index.md index d6aa78b3d..eb8873ae8 100644 --- a/docs/yo/docs/index.md +++ b/docs/yo/docs/index.md @@ -87,7 +87,7 @@ FastAPI jẹ́ ìgbàlódé, tí ó yára (iṣẹ-giga), ìlànà wẹ́ẹ́b "_Inú mi dùn púpọ̀ nípa **FastAPI**. Ó mú inú ẹnì dùn púpọ̀!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -101,7 +101,7 @@ FastAPI jẹ́ ìgbàlódé, tí ó yára (iṣẹ-giga), ìlànà wẹ́ẹ́b "_A ti yipada si **FastAPI** fún **APIs** wa [...] Mo lérò pé wà á fẹ́ràn rẹ̀ [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
--- diff --git a/docs/zh-hant/docs/async.md b/docs/zh-hant/docs/async.md index 6ab75d2ab..09e2bf994 100644 --- a/docs/zh-hant/docs/async.md +++ b/docs/zh-hant/docs/async.md @@ -381,7 +381,7 @@ Starlette (和 **FastAPI**) 是基於 Gevent。但這些程式碼要更難以理解、調試和思考。 -在較舊的 NodeJS / 瀏覽器 JavaScript 中,你會使用「回呼」,這可能會導致回呼地獄。 +在較舊的 NodeJS / 瀏覽器 JavaScript 中,你會使用「回呼」,這可能會導致“回呼地獄”。 ## 協程 diff --git a/docs/zh-hant/docs/deployment/cloud.md b/docs/zh-hant/docs/deployment/cloud.md index 29ebe3ff5..426937d3e 100644 --- a/docs/zh-hant/docs/deployment/cloud.md +++ b/docs/zh-hant/docs/deployment/cloud.md @@ -10,8 +10,4 @@ 這也展現了他們對 FastAPI 和其**社群**(包括你)的真正承諾,他們不僅希望為你提供**優質的服務**,還希望確保你擁有一個**良好且健康的框架**:FastAPI。🙇 -你可能會想嘗試他們的服務,以下有他們的指南: - -* Platform.sh -* Porter -* Coherence +你可能會想嘗試他們的服務,以下有他們的指南. diff --git a/docs/zh-hant/docs/index.md b/docs/zh-hant/docs/index.md index 81d99ede4..168ad5c4c 100644 --- a/docs/zh-hant/docs/index.md +++ b/docs/zh-hant/docs/index.md @@ -81,7 +81,7 @@ FastAPI 是一個現代、快速(高效能)的 web 框架,用於 Python "_我對 **FastAPI** 興奮得不得了。它太有趣了!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - Python Bytes podcast host (ref)
--- @@ -95,7 +95,7 @@ FastAPI 是一個現代、快速(高效能)的 web 框架,用於 Python "_我們的 **APIs** 已經改用 **FastAPI** [...] 我想你會喜歡它 [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI 創辦人 - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI 創辦人 - spaCy creators (ref) - (ref)
--- diff --git a/docs/zh/docs/async.md b/docs/zh/docs/async.md index 9e6962eb1..4028ed51a 100644 --- a/docs/zh/docs/async.md +++ b/docs/zh/docs/async.md @@ -383,7 +383,7 @@ Starlette (和 **FastAPI**) 是基于 Gevent。但代码的理解、调试和思考都要复杂许多。 -在以前版本的 NodeJS / 浏览器 JavaScript 中,你会使用"回调",因此也可能导致回调地狱。 +在以前版本的 NodeJS / 浏览器 JavaScript 中,你会使用"回调",因此也可能导致“回调地狱”。 ## 协程 diff --git a/docs/zh/docs/deployment/cloud.md b/docs/zh/docs/deployment/cloud.md index b086b7b6b..8a892a560 100644 --- a/docs/zh/docs/deployment/cloud.md +++ b/docs/zh/docs/deployment/cloud.md @@ -10,7 +10,4 @@ 这表明了他们对 FastAPI 及其**社区**(您)的真正承诺,因为他们不仅想为您提供**良好的服务**,而且还想确保您拥有一个**良好且健康的框架**:FastAPI。 🙇 -您可能想尝试他们的服务并阅读他们的指南: - -* Platform.sh -* Porter +您可能想尝试他们的服务并阅读他们的指南. diff --git a/docs/zh/docs/help-fastapi.md b/docs/zh/docs/help-fastapi.md index 09f37a44b..f01eb9eb5 100644 --- a/docs/zh/docs/help-fastapi.md +++ b/docs/zh/docs/help-fastapi.md @@ -22,7 +22,7 @@ ## 在推特上关注 FastAPI -在 **Twitter** 上关注 @fastapi 获取 **FastAPI** 的最新消息。🐦 +在 **X (Twitter)** 上关注 @fastapi 获取 **FastAPI** 的最新消息。🐦 ## 在 GitHub 上为 **FastAPI** 加星 @@ -47,19 +47,19 @@ * 在 **GitHub** 上关注我 * 了解其它我创建的开源项目,或许对您会有帮助 * 关注我什么时候创建新的开源项目 -* 在 **Twitter** 上关注我 +* 在 **X (Twitter)** 上关注我 * 告诉我您使用 FastAPI(我非常乐意听到这种消息) * 接收我发布公告或新工具的消息 - * 您还可以关注@fastapi on Twitter,这是个独立的账号 + * 您还可以关注@fastapi on X (Twitter),这是个独立的账号 * 在**领英**上联系我 - * 接收我发布公告或新工具的消息(虽然我用 Twitter 比较多) + * 接收我发布公告或新工具的消息(虽然我用 X (Twitter) 比较多) * 阅读我在 **Dev.to****Medium** 上的文章,或关注我 * 阅读我的其它想法、文章,了解我创建的工具 * 关注我,这样就可以随时看到我发布的新文章 ## Tweet about **FastAPI** -Tweet about **FastAPI** 让我和大家知道您为什么喜欢 FastAPI。🎉 +Tweet about **FastAPI** 让我和大家知道您为什么喜欢 FastAPI。🎉 知道有人使用 **FastAPI**,我会很开心,我也想知道您为什么喜欢 FastAPI,以及您在什么项目/哪些公司使用 FastAPI,等等。 diff --git a/docs/zh/docs/index.md b/docs/zh/docs/index.md index 94cf8745c..680e2db50 100644 --- a/docs/zh/docs/index.md +++ b/docs/zh/docs/index.md @@ -88,7 +88,7 @@ FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框 「_**FastAPI** 让我兴奋的欣喜若狂。它太棒了!_」 -
Brian Okken - Python Bytes 播客主持人 (ref)
+
Brian Okken - Python Bytes 播客主持人 (ref)
--- @@ -102,7 +102,7 @@ FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框 「_我们已经将 **API** 服务切换到了 **FastAPI** [...] 我认为你会喜欢它的 [...]_」 -
Ines Montani - Matthew Honnibal - Explosion AI 创始人 - spaCy 作者 (ref) - (ref)
+
Ines Montani - Matthew Honnibal - Explosion AI 创始人 - spaCy 作者 (ref) - (ref)
--- diff --git a/docs/zh/docs/python-types.md b/docs/zh/docs/python-types.md index ba767da87..a7f76d97f 100644 --- a/docs/zh/docs/python-types.md +++ b/docs/zh/docs/python-types.md @@ -240,7 +240,29 @@ John Doe 下面的例子来自 Pydantic 官方文档: -{* ../../docs_src/python_types/tutorial010.py *} +//// tab | Python 3.10+ + +```Python +{!> ../../docs_src/python_types/tutorial011_py310.py!} +``` + +//// + +//// tab | Python 3.9+ + +```Python +{!> ../../docs_src/python_types/tutorial011_py39.py!} +``` + +//// + +//// tab | Python 3.8+ + +```Python +{!> ../../docs_src/python_types/tutorial011.py!} +``` + +//// /// info diff --git a/docs/zh/docs/tutorial/security/index.md b/docs/zh/docs/tutorial/security/index.md index e888a4fe9..1484b99fd 100644 --- a/docs/zh/docs/tutorial/security/index.md +++ b/docs/zh/docs/tutorial/security/index.md @@ -22,7 +22,7 @@ OAuth2是一个规范,它定义了几种处理身份认证和授权的方法 它包括了使用「第三方」进行身份认证的方法。 -这就是所有带有「使用 Facebook,Google,Twitter,GitHub 登录」的系统背后所使用的机制。 +这就是所有带有「使用 Facebook,Google,X (Twitter),GitHub 登录」的系统背后所使用的机制。 ### OAuth 1 @@ -79,7 +79,7 @@ OpenAPI 定义了以下安全方案: * HTTP Basic 认证方式。 * HTTP Digest,等等。 * `oauth2`:所有的 OAuth2 处理安全性的方式(称为「流程」)。 - *以下几种流程适合构建 OAuth 2.0 身份认证的提供者(例如 Google,Facebook,Twitter,GitHub 等): + *以下几种流程适合构建 OAuth 2.0 身份认证的提供者(例如 Google,Facebook,X (Twitter),GitHub 等): * `implicit` * `clientCredentials` * `authorizationCode` @@ -91,7 +91,7 @@ OpenAPI 定义了以下安全方案: /// tip -集成其他身份认证/授权提供者(例如Google,Facebook,Twitter,GitHub等)也是可能的,而且较为容易。 +集成其他身份认证/授权提供者(例如Google,Facebook,X (Twitter),GitHub等)也是可能的,而且较为容易。 最复杂的问题是创建一个像这样的身份认证/授权提供程序,但是 **FastAPI** 为你提供了轻松完成任务的工具,同时为你解决了重活。 diff --git a/docs_src/app_testing/tutorial004.py b/docs_src/app_testing/tutorial004.py new file mode 100644 index 000000000..f83ac9ae9 --- /dev/null +++ b/docs_src/app_testing/tutorial004.py @@ -0,0 +1,43 @@ +from contextlib import asynccontextmanager + +from fastapi import FastAPI +from fastapi.testclient import TestClient + +items = {} + + +@asynccontextmanager +async def lifespan(app: FastAPI): + items["foo"] = {"name": "Fighters"} + items["bar"] = {"name": "Tenders"} + yield + # clean up items + items.clear() + + +app = FastAPI(lifespan=lifespan) + + +@app.get("/items/{item_id}") +async def read_items(item_id: str): + return items[item_id] + + +def test_read_items(): + # Before the lifespan starts, "items" is still empty + assert items == {} + + with TestClient(app) as client: + # Inside the "with TestClient" block, the lifespan starts and items added + assert items == {"foo": {"name": "Fighters"}, "bar": {"name": "Tenders"}} + + response = client.get("/items/foo") + assert response.status_code == 200 + assert response.json() == {"name": "Fighters"} + + # After the requests is done, the items are still there + assert items == {"foo": {"name": "Fighters"}, "bar": {"name": "Tenders"}} + + # The end of the "with TestClient" block simulates terminating the app, so + # the lifespan ends and items are cleaned up + assert items == {} diff --git a/docs_src/security/tutorial005.py b/docs_src/security/tutorial005.py index ccad07969..447dacb37 100644 --- a/docs_src/security/tutorial005.py +++ b/docs_src/security/tutorial005.py @@ -119,7 +119,8 @@ async def get_current_user( username: str = payload.get("sub") if username is None: raise credentials_exception - token_scopes = payload.get("scopes", []) + scope: str = payload.get("scope", "") + token_scopes = scope.split(" ") token_data = TokenData(scopes=token_scopes, username=username) except (InvalidTokenError, ValidationError): raise credentials_exception @@ -153,7 +154,7 @@ async def login_for_access_token( raise HTTPException(status_code=400, detail="Incorrect username or password") access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES) access_token = create_access_token( - data={"sub": user.username, "scopes": form_data.scopes}, + data={"sub": user.username, "scope": " ".join(form_data.scopes)}, expires_delta=access_token_expires, ) return Token(access_token=access_token, token_type="bearer") diff --git a/docs_src/security/tutorial005_an.py b/docs_src/security/tutorial005_an.py index 2e8bb3bdb..d2c4fe9b8 100644 --- a/docs_src/security/tutorial005_an.py +++ b/docs_src/security/tutorial005_an.py @@ -120,7 +120,8 @@ async def get_current_user( username = payload.get("sub") if username is None: raise credentials_exception - token_scopes = payload.get("scopes", []) + scope: str = payload.get("scope", "") + token_scopes = scope.split(" ") token_data = TokenData(scopes=token_scopes, username=username) except (InvalidTokenError, ValidationError): raise credentials_exception @@ -154,7 +155,7 @@ async def login_for_access_token( raise HTTPException(status_code=400, detail="Incorrect username or password") access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES) access_token = create_access_token( - data={"sub": user.username, "scopes": form_data.scopes}, + data={"sub": user.username, "scope": " ".join(form_data.scopes)}, expires_delta=access_token_expires, ) return Token(access_token=access_token, token_type="bearer") diff --git a/docs_src/security/tutorial005_an_py310.py b/docs_src/security/tutorial005_an_py310.py index 90781587f..e3527370d 100644 --- a/docs_src/security/tutorial005_an_py310.py +++ b/docs_src/security/tutorial005_an_py310.py @@ -119,7 +119,8 @@ async def get_current_user( username = payload.get("sub") if username is None: raise credentials_exception - token_scopes = payload.get("scopes", []) + scope: str = payload.get("scope", "") + token_scopes = scope.split(" ") token_data = TokenData(scopes=token_scopes, username=username) except (InvalidTokenError, ValidationError): raise credentials_exception @@ -153,7 +154,7 @@ async def login_for_access_token( raise HTTPException(status_code=400, detail="Incorrect username or password") access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES) access_token = create_access_token( - data={"sub": user.username, "scopes": form_data.scopes}, + data={"sub": user.username, "scope": " ".join(form_data.scopes)}, expires_delta=access_token_expires, ) return Token(access_token=access_token, token_type="bearer") diff --git a/docs_src/security/tutorial005_an_py39.py b/docs_src/security/tutorial005_an_py39.py index a5192d8d6..3dc3140c3 100644 --- a/docs_src/security/tutorial005_an_py39.py +++ b/docs_src/security/tutorial005_an_py39.py @@ -119,7 +119,8 @@ async def get_current_user( username = payload.get("sub") if username is None: raise credentials_exception - token_scopes = payload.get("scopes", []) + scope: str = payload.get("scope", "") + token_scopes = scope.split(" ") token_data = TokenData(scopes=token_scopes, username=username) except (InvalidTokenError, ValidationError): raise credentials_exception @@ -153,7 +154,7 @@ async def login_for_access_token( raise HTTPException(status_code=400, detail="Incorrect username or password") access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES) access_token = create_access_token( - data={"sub": user.username, "scopes": form_data.scopes}, + data={"sub": user.username, "scope": " ".join(form_data.scopes)}, expires_delta=access_token_expires, ) return Token(access_token=access_token, token_type="bearer") diff --git a/docs_src/security/tutorial005_py310.py b/docs_src/security/tutorial005_py310.py index b244ef08e..3fc15212b 100644 --- a/docs_src/security/tutorial005_py310.py +++ b/docs_src/security/tutorial005_py310.py @@ -118,7 +118,8 @@ async def get_current_user( username: str = payload.get("sub") if username is None: raise credentials_exception - token_scopes = payload.get("scopes", []) + scope: str = payload.get("scope", "") + token_scopes = scope.split(" ") token_data = TokenData(scopes=token_scopes, username=username) except (InvalidTokenError, ValidationError): raise credentials_exception @@ -152,7 +153,7 @@ async def login_for_access_token( raise HTTPException(status_code=400, detail="Incorrect username or password") access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES) access_token = create_access_token( - data={"sub": user.username, "scopes": form_data.scopes}, + data={"sub": user.username, "scope": " ".join(form_data.scopes)}, expires_delta=access_token_expires, ) return Token(access_token=access_token, token_type="bearer") diff --git a/docs_src/security/tutorial005_py39.py b/docs_src/security/tutorial005_py39.py index 8f0e93376..f9aed0a42 100644 --- a/docs_src/security/tutorial005_py39.py +++ b/docs_src/security/tutorial005_py39.py @@ -119,7 +119,8 @@ async def get_current_user( username: str = payload.get("sub") if username is None: raise credentials_exception - token_scopes = payload.get("scopes", []) + scope: str = payload.get("scope", "") + token_scopes = scope.split(" ") token_data = TokenData(scopes=token_scopes, username=username) except (InvalidTokenError, ValidationError): raise credentials_exception @@ -153,7 +154,7 @@ async def login_for_access_token( raise HTTPException(status_code=400, detail="Incorrect username or password") access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES) access_token = create_access_token( - data={"sub": user.username, "scopes": form_data.scopes}, + data={"sub": user.username, "scope": " ".join(form_data.scopes)}, expires_delta=access_token_expires, ) return Token(access_token=access_token, token_type="bearer") diff --git a/tests/test_tutorial/test_testing/test_tutorial004.py b/tests/test_tutorial/test_testing/test_tutorial004.py new file mode 100644 index 000000000..812ee44c1 --- /dev/null +++ b/tests/test_tutorial/test_testing/test_tutorial004.py @@ -0,0 +1,5 @@ +from docs_src.app_testing.tutorial004 import test_read_items + + +def test_main(): + test_read_items()