family-names: Christie
email: tom@tomchristie.com
repository-code: "https://github.com/Kludex/starlette"
-url: "https://www.starlette.dev/"
+url: "https://starlette.dev/"
abstract: Starlette is an ASGI web framework for Python.
keywords:
- asgi
---
-**Documentation**: <a href="https://www.starlette.dev/" target="_blank">https://www.starlette.dev</a>
+**Documentation**: <a href="https://starlette.dev/" target="_blank">https://starlette.dev</a>
**Source Code**: <a href="https://github.com/Kludex/starlette" target="_blank">https://github.com/Kludex/starlette</a>
---
-**Documentation**: <a href="https://www.starlette.dev/" target="_blank">https://www.starlette.dev</a>
+**Documentation**: <a href="https://starlette.dev/" target="_blank">https://starlette.dev</a>
**Source Code**: <a href="https://github.com/Kludex/starlette" target="_blank">https://github.com/Kludex/starlette</a>
<script>
// Redirect starlette.io to starlette.dev
if (window.location.hostname === 'www.starlette.io' || window.location.hostname === 'starlette.io') {
- const newUrl = window.location.href.replace(/^https?:\/\/(www\.)?starlette\.io/, 'https://www.starlette.dev');
+ const newUrl = window.location.href.replace(/^https?:\/\/(www\.)?starlette\.io/, 'https://starlette.dev');
window.location.replace(newUrl);
}
</script>
### Removed
* `UJSONResponse` was removed (this change was intended to be included in 0.14.0). Please see the
- [documentation](https://www.starlette.dev/responses/#custom-json-serialization) for how to
+ [documentation](https://starlette.dev/responses/#custom-json-serialization) for how to
implement responses using custom JSON serialization -
[#1074](https://github.com/Kludex/starlette/pull/1047).
site_name: Starlette
site_description: The little ASGI library that shines.
-site_url: https://www.starlette.dev
+site_url: https://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.dev/"
-Changelog = "https://www.starlette.dev/release-notes/"
+Documentation = "https://starlette.dev/"
+Changelog = "https://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.dev/exceptions/ for the recommended approach.",
+ "Refer to https://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.dev/routing/ for the recommended approach.",
+ "Refer to https://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.dev/routing/#websocket-routing for the recommended approach.",
+ "Refer to https://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.dev/middleware/#using-middleware for recommended approach.",
+ "Refer to https://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.dev/lifespan/.",
+ "See more about it on https://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.dev/routing/#http-routing for the recommended approach.",
+ "Refer to https://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.dev/routing/#websocket-routing for the recommended approach.",
+ "https://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.dev/lifespan/ for recommended approach.",
+ "Refer to https://starlette.dev/lifespan/ for recommended approach.",
DeprecationWarning,
)