This commit is contained in:
2018-10-26 11:08:37 -04:00
parent a08b275463
commit c872fe3c78
+1 -12
View File
@@ -9,18 +9,7 @@
[![](https://github.com/kennethreitz/responder/raw/master/ext/small.jpg)](http://python-responder.org/)
```python
import responder
api = responder.API()
@api.route("/{greeting}")
async def greet_world(req, resp, *, greeting):
resp.text = f"{greeting}, world!"
if __name__ == '__main__':
api.run()
```
![](https://farm2.staticflickr.com/1959/43750081370_a4e20752de_o_d.png)
Powered by [Starlette](https://www.starlette.io/). That `async` declaration is optional. [View documentation](http://python-responder.org).