family-names: Christie
email: tom@tomchristie.com
repository-code: "https://github.com/Kludex/starlette"
-url: "https://www.starlette.io/"
+url: "https://www.starlette.dev/"
abstract: Starlette is an ASGI web framework for Python.
keywords:
- asgi
---
-**Documentation**: <a href="https://www.starlette.io/" target="_blank">https://www.starlette.io</a>
+**Documentation**: <a href="https://www.starlette.dev/" target="_blank">https://www.starlette.dev</a>
**Source Code**: <a href="https://github.com/Kludex/starlette" target="_blank">https://github.com/Kludex/starlette</a>
}
```
-It's important to notice that in case a [`BackgroundTask`](https://www.starlette.io/background/) raises an exception,
+It's important to notice that in case a [`BackgroundTask`](background.md) raises an exception,
it will be handled by the `handle_error` function, but at that point, the response was already sent. In other words,
the response created by `handle_error` will be discarded. In case the error happens before the response was sent, then
it will use the response object - in the above example, the returned `JSONResponse`.
---
-**Documentation**: <a href="https://www.starlette.io/" target="_blank">https://www.starlette.io</a>
+**Documentation**: <a href="https://www.starlette.dev/" target="_blank">https://www.starlette.dev</a>
**Source Code**: <a href="https://github.com/Kludex/starlette" target="_blank">https://github.com/Kludex/starlette</a>
### Removed
* `UJSONResponse` was removed (this change was intended to be included in 0.14.0). Please see the
- [documentation](https://www.starlette.io/responses/#custom-json-serialization) for how to
+ [documentation](https://www.starlette.dev/responses/#custom-json-serialization) for how to
implement responses using custom JSON serialization -
[#1074](https://github.com/Kludex/starlette/pull/1047).
<a href="https://github.com/DavidVentura/starlette-static-resources" target="_blank">GitHub</a>
-Allows mounting [package resources](https://docs.python.org/3/library/importlib.resources.html#module-importlib.resources) for static data, similar to [StaticFiles](https://www.starlette.io/staticfiles/).
+Allows mounting [package resources](https://docs.python.org/3/library/importlib.resources.html#module-importlib.resources) for static data, similar to [StaticFiles](staticfiles.md).
### Sentry
<a href="https://github.com/posit-dev/py-shiny" target="_blank">GitHub</a> |
<a href="https://shiny.posit.co/py/" target="_blank">Documentation</a>
-Leveraging Starlette and asyncio, Shiny allows developers to create effortless Python web applications using the power of reactive programming. Shiny eliminates the hassle of manual state management, automatically determining the best execution path for your app at runtime while simultaneously minimizing re-rendering. This means that Shiny can support everything from the simplest dashboard to full-featured web apps.
\ No newline at end of file
+Leveraging Starlette and asyncio, Shiny allows developers to create effortless Python web applications using the power of reactive programming. Shiny eliminates the hassle of manual state management, automatically determining the best execution path for your app at runtime while simultaneously minimizing re-rendering. This means that Shiny can support everything from the simplest dashboard to full-featured web apps.
site_name: Starlette
site_description: The little ASGI library that shines.
-site_url: https://www.starlette.io
+site_url: https://www.starlette.dev
repo_name: Kludex/starlette
repo_url: https://github.com/Kludex/starlette
[project.urls]
Homepage = "https://github.com/Kludex/starlette"
-Documentation = "https://www.starlette.io/"
-Changelog = "https://www.starlette.io/release-notes/"
+Documentation = "https://www.starlette.dev/"
+Changelog = "https://www.starlette.dev/release-notes/"
Funding = "https://github.com/sponsors/Kludex"
Source = "https://github.com/Kludex/starlette"
def exception_handler(self, exc_class_or_status_code: int | type[Exception]) -> Callable: # type: ignore[type-arg]
warnings.warn(
"The `exception_handler` decorator is deprecated, and will be removed in version 1.0.0. "
- "Refer to https://www.starlette.io/exceptions/ for the recommended approach.",
+ "Refer to https://www.starlette.dev/exceptions/ for the recommended approach.",
DeprecationWarning,
)
"""
warnings.warn(
"The `route` decorator is deprecated, and will be removed in version 1.0.0. "
- "Refer to https://www.starlette.io/routing/ for the recommended approach.",
+ "Refer to https://www.starlette.dev/routing/ for the recommended approach.",
DeprecationWarning,
)
"""
warnings.warn(
"The `websocket_route` decorator is deprecated, and will be removed in version 1.0.0. "
- "Refer to https://www.starlette.io/routing/#websocket-routing for the recommended approach.",
+ "Refer to https://www.starlette.dev/routing/#websocket-routing for the recommended approach.",
DeprecationWarning,
)
"""
warnings.warn(
"The `middleware` decorator is deprecated, and will be removed in version 1.0.0. "
- "Refer to https://www.starlette.io/middleware/#using-middleware for recommended approach.",
+ "Refer to https://www.starlette.dev/middleware/#using-middleware for recommended approach.",
DeprecationWarning,
)
assert middleware_type == "http", 'Currently only middleware("http") is supported.'
warnings.warn(
"The on_startup and on_shutdown parameters are deprecated, and they "
"will be removed on version 1.0. Use the lifespan parameter instead. "
- "See more about it on https://www.starlette.io/lifespan/.",
+ "See more about it on https://www.starlette.dev/lifespan/.",
DeprecationWarning,
)
if lifespan:
"""
warnings.warn(
"The `route` decorator is deprecated, and will be removed in version 1.0.0."
- "Refer to https://www.starlette.io/routing/#http-routing for the recommended approach.",
+ "Refer to https://www.starlette.dev/routing/#http-routing for the recommended approach.",
DeprecationWarning,
)
"""
warnings.warn(
"The `websocket_route` decorator is deprecated, and will be removed in version 1.0.0. Refer to "
- "https://www.starlette.io/routing/#websocket-routing for the recommended approach.",
+ "https://www.starlette.dev/routing/#websocket-routing for the recommended approach.",
DeprecationWarning,
)
def on_event(self, event_type: str) -> Callable: # type: ignore[type-arg]
warnings.warn(
"The `on_event` decorator is deprecated, and will be removed in version 1.0.0. "
- "Refer to https://www.starlette.io/lifespan/ for recommended approach.",
+ "Refer to https://www.starlette.dev/lifespan/ for recommended approach.",
DeprecationWarning,
)