]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
Remove `www.` to prevent redirects
authorYurii Motov <yurii.motov.monte@gmail.com>
Fri, 10 Jul 2026 15:02:13 +0000 (17:02 +0200)
committerYurii Motov <yurii.motov.monte@gmail.com>
Fri, 10 Jul 2026 16:13:09 +0000 (18:13 +0200)
25 files changed:
README.md
docs/en/docs/advanced/events.md
docs/en/docs/advanced/middleware.md
docs/en/docs/advanced/response-cookies.md
docs/en/docs/advanced/response-headers.md
docs/en/docs/advanced/templates.md
docs/en/docs/advanced/testing-events.md
docs/en/docs/advanced/testing-websockets.md
docs/en/docs/advanced/using-request-directly.md
docs/en/docs/advanced/websockets.md
docs/en/docs/alternatives.md
docs/en/docs/deployment/manually.md
docs/en/docs/fastapi-cli.md
docs/en/docs/features.md
docs/en/docs/history-design-future.md
docs/en/docs/how-to/custom-request-and-route.md
docs/en/docs/index.md
docs/en/docs/release-notes.md
docs/en/docs/tutorial/background-tasks.md
docs/en/docs/tutorial/first-steps.md
docs/en/docs/tutorial/handling-errors.md
docs/en/docs/tutorial/middleware.md
docs/en/docs/tutorial/static-files.md
docs/en/docs/tutorial/testing.md
fastapi/applications.py

index 3fa6bb2999867c6e04002c6afcfbb04e21d05259..5367cd3a1a8a9a0e4c11c785cb25f3edabf586a8 100644 (file)
--- a/README.md
+++ b/README.md
@@ -129,7 +129,7 @@ If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be
 
 FastAPI stands on the shoulders of giants:
 
-* [Starlette](https://www.starlette.dev/) for the web parts.
+* [Starlette](https://starlette.dev/) for the web parts.
 * [Pydantic](https://docs.pydantic.dev/) for the data parts.
 
 ## Installation
@@ -231,7 +231,7 @@ INFO:     Application startup complete.
 <details markdown="1">
 <summary>About the command <code>fastapi dev</code>...</summary>
 
-The command `fastapi dev` reads your `main.py` file automatically, detects the **FastAPI** app in it, and starts a server using [Uvicorn](https://www.uvicorn.dev).
+The command `fastapi dev` reads your `main.py` file automatically, detects the **FastAPI** app in it, and starts a server using [Uvicorn](https://uvicorn.dev).
 
 By default, `fastapi dev` will start with auto-reload enabled for local development.
 
@@ -508,7 +508,7 @@ Used by Starlette:
 
 Used by FastAPI:
 
-* [`uvicorn`](https://www.uvicorn.dev) - for the server that loads and serves your application. This includes `uvicorn[standard]`, which includes some dependencies (e.g. `uvloop`) needed for high performance serving.
+* [`uvicorn`](https://uvicorn.dev) - for the server that loads and serves your application. This includes `uvicorn[standard]`, which includes some dependencies (e.g. `uvloop`) needed for high performance serving.
 * `fastapi-cli[standard]` - to provide the `fastapi` command.
     * This includes `fastapi-cloud-cli`, which allows you to deploy your FastAPI application to [FastAPI Cloud](https://fastapicloud.com).
 
index 8f8cdb0176f4d768c909caebc0060725ef21ebab..485340afe2067c8ca2a03d70e4830a240ea085f5 100644 (file)
@@ -154,7 +154,7 @@ Underneath, in the ASGI technical specification, this is part of the [Lifespan P
 
 /// note
 
-You can read more about the Starlette `lifespan` handlers in [Starlette's  Lifespan' docs](https://www.starlette.dev/lifespan/).
+You can read more about the Starlette `lifespan` handlers in [Starlette's  Lifespan' docs](https://starlette.dev/lifespan/).
 
 Including how to handle lifespan state that can be used in other areas of your code.
 
index 65f9438c95f230b136e565e608957395538232c1..46328bbf0e010641e6f1df9dd35a8d1e1ea7894c 100644 (file)
@@ -94,4 +94,4 @@ For example:
 * [Uvicorn's `ProxyHeadersMiddleware`](https://github.com/encode/uvicorn/blob/master/uvicorn/middleware/proxy_headers.py)
 * [MessagePack](https://github.com/florimondmanca/msgpack-asgi)
 
-To see other available middlewares check [Starlette's Middleware docs](https://www.starlette.dev/middleware/) and the [ASGI Awesome List](https://github.com/florimondmanca/awesome-asgi).
+To see other available middlewares check [Starlette's Middleware docs](https://starlette.dev/middleware/) and the [ASGI Awesome List](https://github.com/florimondmanca/awesome-asgi).
index f523a5c63cdafce24df0f1b5342c29a0f41a13bb..81da22b406b455e49cc757595775837b083faa97 100644 (file)
@@ -48,4 +48,4 @@ And as the `Response` can be used frequently to set headers and cookies, **FastA
 
 ///
 
-To see all the available parameters and options, check the [documentation in Starlette](https://www.starlette.dev/responses/#set-cookie).
+To see all the available parameters and options, check the [documentation in Starlette](https://starlette.dev/responses/#set-cookie).
index cbc28e4959f897a53d79769debae954d85d2fb0d..c36850836e08a9a0284afc439a4b93cccb855c05 100644 (file)
@@ -38,4 +38,4 @@ And as the `Response` can be used frequently to set headers and cookies, **FastA
 
 Keep in mind that custom proprietary headers can be added [using the `X-` prefix](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers).
 
-But if you have custom headers that you want a client in a browser to be able to see, you need to add them to your CORS configurations (read more in [CORS (Cross-Origin Resource Sharing)](../tutorial/cors.md)), using the parameter `expose_headers` documented in [Starlette's CORS docs](https://www.starlette.dev/middleware/#corsmiddleware).
+But if you have custom headers that you want a client in a browser to be able to see, you need to add them to your CORS configurations (read more in [CORS (Cross-Origin Resource Sharing)](../tutorial/cors.md)), using the parameter `expose_headers` documented in [Starlette's CORS docs](https://starlette.dev/middleware/#corsmiddleware).
index 6570865e27ed06cc90e79db0980ffad3ef8314f7..cb557db1b703751282648628af852e652bf6bd8c 100644 (file)
@@ -123,4 +123,4 @@ And because you are using `StaticFiles`, that CSS file would be served automatic
 
 ## More details { #more-details }
 
-For more details, including how to test templates, check [Starlette's docs on templates](https://www.starlette.dev/templates/).
+For more details, including how to test templates, check [Starlette's docs on templates](https://starlette.dev/templates/).
index ba42e716952c0be84f55ef8aff2f86385163d07b..146d36dbc1b47912417dd048ace089979df943dc 100644 (file)
@@ -5,7 +5,7 @@ When you need `lifespan` to run in your tests, you can use the `TestClient` with
 {* ../../docs_src/app_testing/tutorial004_py310.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.dev/lifespan/#running-lifespan-in-tests)
+You can read more details about the ["Running lifespan in tests in the official Starlette documentation site."](https://starlette.dev/lifespan/#running-lifespan-in-tests)
 
 For the deprecated `startup` and `shutdown` events, you can use the `TestClient` as follows:
 
index 040f8e3b0790c954059334c174145049611a2380..b11e96ecf097c3e206e4754c553b3ffe97c87eac 100644 (file)
@@ -8,6 +8,6 @@ For this, you use the `TestClient` in a `with` statement, connecting to the WebS
 
 /// note
 
-For more details, check Starlette's documentation for [testing WebSockets](https://www.starlette.dev/testclient/#testing-websocket-sessions).
+For more details, check Starlette's documentation for [testing WebSockets](https://starlette.dev/testclient/#testing-websocket-sessions).
 
 ///
index 75d859f8309854526da25a9ca661c46e52cdf575..e75c4031fbcc711dd9f11e1b47b8f608ef00add0 100644 (file)
@@ -15,7 +15,7 @@ But there are situations where you might need to access the `Request` object dir
 
 ## Details about the `Request` object { #details-about-the-request-object }
 
-As **FastAPI** is actually **Starlette** underneath, with a layer of several tools on top, you can use Starlette's [`Request`](https://www.starlette.dev/requests/) object directly when you need to.
+As **FastAPI** is actually **Starlette** underneath, with a layer of several tools on top, you can use Starlette's [`Request`](https://starlette.dev/requests/) object directly when you need to.
 
 It would also mean that if you get data from the `Request` object directly (for example, read the body) it won't be validated, converted or documented (with OpenAPI, for the automatic API user interface) by FastAPI.
 
@@ -45,7 +45,7 @@ The same way, you can declare any other parameter as normally, and additionally,
 
 ## `Request` documentation { #request-documentation }
 
-You can read more details about the [`Request` object in the official Starlette documentation site](https://www.starlette.dev/requests/).
+You can read more details about the [`Request` object in the official Starlette documentation site](https://starlette.dev/requests/).
 
 /// note | Technical Details
 
index 6f4603e6ac3c96eb8a28a327dfee3b71b2458464..203a9faee7445b1e9820f3b64313fa128c689d3c 100644 (file)
@@ -182,5 +182,5 @@ If you need something easy to integrate with FastAPI but that is more robust, su
 
 To learn more about the options, check Starlette's documentation for:
 
-* [The `WebSocket` class](https://www.starlette.dev/websockets/).
-* [Class-based WebSocket handling](https://www.starlette.dev/endpoints/#websocketendpoint).
+* [The `WebSocket` class](https://starlette.dev/websockets/).
+* [Class-based WebSocket handling](https://starlette.dev/endpoints/#websocketendpoint).
index d4d622b84772350b18269da27e7fdbe9ee5d5b98..adb2f67808beab62285329b14f3f238b442eb703 100644 (file)
@@ -417,7 +417,7 @@ Handle all the data validation, data serialization and automatic model documenta
 
 ///
 
-### [Starlette](https://www.starlette.dev/) { #starlette }
+### [Starlette](https://starlette.dev/) { #starlette }
 
 Starlette is a lightweight <dfn title="The new standard for building asynchronous Python web applications">ASGI</dfn> framework/toolkit, which is ideal for building high-performance asyncio services.
 
@@ -462,7 +462,7 @@ So, anything that you can do with Starlette, you can do it directly with **FastA
 
 ///
 
-### [Uvicorn](https://www.uvicorn.dev/) { #uvicorn }
+### [Uvicorn](https://uvicorn.dev) { #uvicorn }
 
 Uvicorn is a lightning-fast ASGI server, built on uvloop and httptools.
 
index ed49aa00ac9b02927e3e3ff6eefb3bd89b04366a..56aafcd2ef3a5919c096b0711cd92db9381582dc 100644 (file)
@@ -52,7 +52,7 @@ The main thing you need to run a **FastAPI** application (or any other ASGI appl
 
 There are several alternatives, including:
 
-* [Uvicorn](https://www.uvicorn.dev/): a high performance ASGI server.
+* [Uvicorn](https://uvicorn.dev): a high performance ASGI server.
 * [Hypercorn](https://hypercorn.readthedocs.io/): an ASGI server compatible with HTTP/2 and Trio among other features.
 * [Daphne](https://github.com/django/daphne): the ASGI server built for Django Channels.
 * [Granian](https://github.com/emmett-framework/granian): A Rust HTTP server for Python applications.
index 9d8f415d9babf0a42f2e0ae0eb824ff44d62bd0e..b46df7a20dc002943ba58991c41fcd9352cbcb27 100644 (file)
@@ -52,7 +52,7 @@ For production you would use `fastapi run` instead of `fastapi dev`. ðŸš€
 
 ///
 
-Internally, **FastAPI CLI** uses [Uvicorn](https://www.uvicorn.dev), a high-performance, production-ready, ASGI server. ðŸ˜Ž
+Internally, **FastAPI CLI** uses [Uvicorn](https://uvicorn.dev), a high-performance, production-ready, ASGI server. ðŸ˜Ž
 
 The `fastapi` CLI will try to detect automatically the FastAPI app to run, assuming it's an object called `app` in a file `main.py` (or a couple other variants).
 
index fa89cf24f12a11ec97778ae00db33e11b0fc5965..2be4eeee6fbbe71caf24d9e364d3ad9409d6acae 100644 (file)
@@ -159,7 +159,7 @@ Any integration is designed to be so simple to use (with dependencies) that you
 
 ## Starlette features { #starlette-features }
 
-**FastAPI** is fully compatible with (and based on) [**Starlette**](https://www.starlette.dev/). So, any additional Starlette code you have, will also work.
+**FastAPI** is fully compatible with (and based on) [**Starlette**](https://starlette.dev/). So, any additional Starlette code you have, will also work.
 
 `FastAPI` is actually a sub-class of `Starlette`. So, if you already know or use Starlette, most of the functionality will work the same way.
 
index b9a7fa6eced895d46c297454d3f27186827f6167..d3dedee67c52adc57b44c30b9b91fe7b207b5a6c 100644 (file)
@@ -58,7 +58,7 @@ After testing several alternatives, I decided that I was going to use [**Pydanti
 
 Then I contributed to it, to make it fully compliant with JSON Schema, to support different ways to define constraint declarations, and to improve editor support (type checks, autocompletion) based on the tests in several editors.
 
-During the development, I also contributed to [**Starlette**](https://www.starlette.dev/), the other key requirement.
+During the development, I also contributed to [**Starlette**](https://starlette.dev/), the other key requirement.
 
 ## Development { #development }
 
index 2b353d9b46e1a693e476b2f5fb5653be081ae246..4561e666fd693d68fdee594704e365f418e4eadc 100644 (file)
@@ -66,7 +66,7 @@ The `scope` `dict` and `receive` function are both part of the ASGI specificatio
 
 And those two things, `scope` and `receive`, are what is needed to create a new `Request` instance.
 
-To learn more about the `Request` check [Starlette's docs about Requests](https://www.starlette.dev/requests/).
+To learn more about the `Request` check [Starlette's docs about Requests](https://starlette.dev/requests/).
 
 ///
 
index 7a1bb4a55b1ddc09d163a888f9c676519784e35a..9b008a596994c97cf40931ffb010cefdb9583777 100644 (file)
@@ -175,7 +175,7 @@ If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be
 
 FastAPI stands on the shoulders of giants:
 
-* [Starlette](https://www.starlette.dev/) for the web parts.
+* [Starlette](https://starlette.dev/) for the web parts.
 * [Pydantic](https://docs.pydantic.dev/) for the data parts.
 
 ## Installation { #installation }
@@ -277,7 +277,7 @@ INFO:     Application startup complete.
 <details markdown="1">
 <summary>About the command <code>fastapi dev</code>...</summary>
 
-The command `fastapi dev` reads your `main.py` file automatically, detects the **FastAPI** app in it, and starts a server using [Uvicorn](https://www.uvicorn.dev).
+The command `fastapi dev` reads your `main.py` file automatically, detects the **FastAPI** app in it, and starts a server using [Uvicorn](https://uvicorn.dev).
 
 By default, `fastapi dev` will start with auto-reload enabled for local development.
 
@@ -554,7 +554,7 @@ Used by Starlette:
 
 Used by FastAPI:
 
-* [`uvicorn`](https://www.uvicorn.dev) - for the server that loads and serves your application. This includes `uvicorn[standard]`, which includes some dependencies (e.g. `uvloop`) needed for high performance serving.
+* [`uvicorn`](https://uvicorn.dev) - for the server that loads and serves your application. This includes `uvicorn[standard]`, which includes some dependencies (e.g. `uvloop`) needed for high performance serving.
 * `fastapi-cli[standard]` - to provide the `fastapi` command.
     * This includes `fastapi-cloud-cli`, which allows you to deploy your FastAPI application to [FastAPI Cloud](https://fastapicloud.com).
 
index c2dac0c4cd9cf04381046f5e9755388062d70222..ebd74f487443068c1b8cfce078668316ec9065d6 100644 (file)
@@ -6854,7 +6854,7 @@ Note: all the previous parameters are still there, so it's still possible to dec
 
 * Upgrade the compatible version of Starlette to `0.12.0`.
     * This includes support for ASGI 3 (the latest version of the standard).
-    * It's now possible to use [Starlette's `StreamingResponse`](https://www.starlette.dev/responses/#streamingresponse) with iterators, like [file-like](https://docs.python.org/3/glossary.html#term-file-like-object) objects (as those returned by `open()`).
+    * It's now possible to use [Starlette's `StreamingResponse`](https://starlette.dev/responses/#streamingresponse) with iterators, like [file-like](https://docs.python.org/3/glossary.html#term-file-like-object) objects (as those returned by `open()`).
     * It's now possible to use the low level utility `iterate_in_threadpool` from `starlette.concurrency` (for advanced scenarios).
     * PR [#243](https://github.com/tiangolo/fastapi/pull/243).
 
index dfb082f34c3e27d34c82f678c4804a1e874378f1..18c9bb6fe5db9f51769bb771f48b9fee4f4aab13 100644 (file)
@@ -63,7 +63,7 @@ And then another background task generated at the *path operation function* will
 
 ## Technical Details { #technical-details }
 
-The class `BackgroundTasks` comes directly from [`starlette.background`](https://www.starlette.dev/background/).
+The class `BackgroundTasks` comes directly from [`starlette.background`](https://starlette.dev/background/).
 
 It is imported/included directly into FastAPI so that you can import it from `fastapi` and avoid accidentally importing the alternative `BackgroundTask` (without the `s` at the end) from `starlette.background`.
 
@@ -71,7 +71,7 @@ By only using `BackgroundTasks` (and not `BackgroundTask`), it's then possible t
 
 It's still possible to use `BackgroundTask` alone in FastAPI, but you have to create the object in your code and return a Starlette `Response` including it.
 
-You can see more details in [Starlette's official docs for Background Tasks](https://www.starlette.dev/background/).
+You can see more details in [Starlette's official docs for Background Tasks](https://starlette.dev/background/).
 
 ## Caveat { #caveat }
 
index 4981725a6ab6bbe08490aeea4a19634ee7018402..0229d611c3d00aee610546757cbcaec1d504ada4 100644 (file)
@@ -232,7 +232,7 @@ That's it! Now you can access your app at that URL. âœ¨
 
 `FastAPI` is a class that inherits directly from `Starlette`.
 
-You can use all the [Starlette](https://www.starlette.dev/) functionality with `FastAPI` too.
+You can use all the [Starlette](https://starlette.dev/) functionality with `FastAPI` too.
 
 ///
 
index bb99813be91a213e84d1b29db8c8047dcba0e715..ed661b03124ea54971fdb707ceeec39bb7e424bb 100644 (file)
@@ -81,7 +81,7 @@ But in case you needed it for an advanced scenario, you can add custom headers:
 
 ## Install custom exception handlers { #install-custom-exception-handlers }
 
-You can add custom exception handlers with [the same exception utilities from Starlette](https://www.starlette.dev/exceptions/).
+You can add custom exception handlers with [the same exception utilities from Starlette](https://starlette.dev/exceptions/).
 
 Let's say you have a custom exception `UnicornException` that you (or a library you use) might `raise`.
 
index 5da549cb7e8ea38855b22c0ac094d7872599bb09..833953597f8ba20241f2c5c2514e7f535ffd2278 100644 (file)
@@ -37,7 +37,7 @@ The middleware function receives:
 
 Keep in mind that custom proprietary headers can be added [using the `X-` prefix](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers).
 
-But if you have custom headers that you want a client in a browser to be able to see, you need to add them to your CORS configurations ([CORS (Cross-Origin Resource Sharing)](cors.md)) using the parameter `expose_headers` documented in [Starlette's CORS docs](https://www.starlette.dev/middleware/#corsmiddleware).
+But if you have custom headers that you want a client in a browser to be able to see, you need to add them to your CORS configurations ([CORS (Cross-Origin Resource Sharing)](cors.md)) using the parameter `expose_headers` documented in [Starlette's CORS docs](https://starlette.dev/middleware/#corsmiddleware).
 
 ///
 
index 4b5057c080be043daa7a53d1d6a20bd77e54fdac..dc866acde2422a5e8a6c3c165f9fbe226d124d2f 100644 (file)
@@ -45,4 +45,4 @@ All these parameters can be different than "`static`", adjust them to the needs
 
 ## More info { #more-info }
 
-For more details and options check [Starlette's docs about Static Files](https://www.starlette.dev/staticfiles/).
+For more details and options check [Starlette's docs about Static Files](https://starlette.dev/staticfiles/).
index 38976dc31536fa5aea52f2d36e7bc3cce778da5f..44b91d7b7da3d3964ab9f0466b39b5e56ad77326 100644 (file)
@@ -1,6 +1,6 @@
 # Testing { #testing }
 
-Thanks to [Starlette](https://www.starlette.dev/testclient/), testing **FastAPI** applications is easy and enjoyable.
+Thanks to [Starlette](https://starlette.dev/testclient/), testing **FastAPI** applications is easy and enjoyable.
 
 It is based on [HTTPX](https://www.python-httpx.org), which in turn is designed based on Requests, so it's very familiar and intuitive.
 
index 8fb665b7dcf61cf3431dd0ab549a03cfb7aabf52..cf55dada4694b826d429a944206db7f2ee57dc9e 100644 (file)
@@ -66,7 +66,7 @@ class FastAPI(Starlette):
                 errors.
 
                 Read more in the
-                [Starlette docs for Applications](https://www.starlette.dev/applications/#starlette.applications.Starlette).
+                [Starlette docs for Applications](https://starlette.dev/applications/#starlette.applications.Starlette).
                 """
             ),
         ] = False,
@@ -960,7 +960,7 @@ class FastAPI(Starlette):
                 This is simply inherited from Starlette.
 
                 Read more about it in the
-                [Starlette docs for Applications](https://www.starlette.dev/applications/#storing-state-on-the-app-instance).
+                [Starlette docs for Applications](https://starlette.dev/applications/#storing-state-on-the-app-instance).
                 """
             ),
         ] = State()