aio-libs / aio-libs/aiohttp

add chaining / mounting routing tables

Offen
#2,923 18 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Python
Sterne
16.5k
Forks
2.4k
Ø Merge
17 Std. 22 Min.
Gemergte PRs (30 T.)
212

Beschreibung

## 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.