You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Promote the app = App() style, but then go on to demonstrate plain ASGI style example, and discuss design philosophy of "everything is just ASGI" , interoperable, eg. use TestClient with Channels.
Naming
WebSocketSession as just WebSocket? Rename session variable as websocket in docs?
Drop StaticFile, and just leave StaticFiles and FileResponse.
Module naming - should it be starlette.requests/starlette.responses instead of starlette.request/starlette.response? Would fit websockets and align better with documentation titles.
App should perhaps be Starlette instead. Less likely to be confused with plain ASGI App class examples, and mirrors eg. flask.Flask and sanic.Sanic.
Class based views instead as HTTPEndpoint and WebSocketEndpoint?
Zero-dependencies
Ensure that requests is only required if TestClient is used. Ensure that aiofiles is only required if FileResponse/StaticFiles is used. We could choose to push FileResponse into the starlette.staticfiles module, and only ever import aiofiles from there.
Introduce
Appfirst in README / Docs intro.app = App()style, but then go on to demonstrate plain ASGI style example, and discuss design philosophy of "everything is just ASGI" , interoperable, eg. useTestClientwith Channels.Naming
WebSocketSessionas justWebSocket? Renamesessionvariable aswebsocketin docs?StaticFile, and just leaveStaticFilesandFileResponse.starlette.requests/starlette.responsesinstead ofstarlette.request/starlette.response? Would fitwebsocketsand align better with documentation titles.Appshould perhaps beStarletteinstead. Less likely to be confused with plain ASGIAppclass examples, and mirrors eg.flask.Flaskandsanic.Sanic.HTTPEndpointandWebSocketEndpoint?Ensure that
requestsis only required ifTestClientis used. Ensure thataiofilesis only required ifFileResponse/StaticFilesis used. We could choose to pushFileResponseinto thestarlette.staticfilesmodule, and only ever importaiofilesfrom there.Features
See https://github.com/encode/starlette/milestone/1
Later
Important