aio-libs / aio-libs/aiohttp

add chaining / mounting routing tables

Aperta
#2,923 18 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
16.5k
Fork
2.4k
Merge medio
17h 22m
PR unite (30g)
212

Descrizione

## Long story short
```python
module = web.RouteTableDef()

@module.get('/status')
async def status(handler):
return web.Response(text="I am fine.")

root = web.RouteTableDef()
root.mount("/api/v1", api_module)
```
Now we got `/api/v1/status` as a route.

## Implementation
If there is interest in having this feature I am willing to look into implementing it and submitting a pull request. I just would like to first clarify API definitions.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.