mirror of https://github.com/encode/starlette.git
Add release notes
This commit is contained in:
parent
8da0f00fe7
commit
b52fd11f32
|
@ -0,0 +1,32 @@
|
|||
## 0.6.0
|
||||
|
||||
### request.path_params
|
||||
|
||||
The biggest change here is that endpoint signatures are no longer:
|
||||
|
||||
```python
|
||||
async def func(request: Request, **kwargs) -> Response
|
||||
```
|
||||
|
||||
Instead we just use:
|
||||
|
||||
```python
|
||||
async def func(request: Request) -> Response
|
||||
```
|
||||
|
||||
The path parameters are available on the request as `request.path_params`.
|
||||
|
||||
This is different to most Python webframeworks, but I think it actually ends up
|
||||
being much more nicely consistent all the way through.
|
||||
|
||||
### app.url_for(name, **path_params)
|
||||
|
||||
Applications now support URL reversing with `app.url_for(name, **path_params)`.
|
||||
|
||||
### app.routes
|
||||
|
||||
Applications now support a `.routes` parameter, which returns a list of `[Route|WebSocketRoute|Mount]`.
|
||||
|
||||
### Route, WebSocketRoute, Mount
|
||||
|
||||
The low level components to `Router` now match the `@app.route()`, `@app.websocket_route()`, and `app.mount()` signatures.
|
|
@ -24,6 +24,7 @@ nav:
|
|||
- Exceptions: 'exceptions.md'
|
||||
- Debug: 'debug.md'
|
||||
- Test Client: 'testclient.md'
|
||||
- Release Notes: 'release-notes.md'
|
||||
|
||||
markdown_extensions:
|
||||
- markdown.extensions.codehilite:
|
||||
|
|
Loading…
Reference in New Issue