vibora-io / vibora
- пятница, 22 июня 2018 г. в 00:14:59
Python
Fast, asynchronous and sexy Python web framework.
Vibora is a sexy and fast async Python 3.6+ http client/server framework. (Alpha stage)
Before you ask, Vibora means Viper in Portuguese :)
Under heavy development, there'll be a release soon, stay hungry, stay foolish :)
from vibora import Vibora, Request
from vibora.responses import JsonResponse
app = Vibora()
@app.route('/')
async def home(request: Request):
return JsonResponse({'hello': 'world'})
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=8000)
import asyncio
from vibora import client
async def hello_world():
response = await client.get('https://google.com/')
print(f'Content: {response.content}')
print(f'Status code: {response.status_code}')
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(hello_world())
Check it out at Vibora docs website.
Frameworks | Requests/Sec | Version |
---|---|---|
Tornado | 14,249 | 5.02 |
Django | 22,727 | 2.0.6 |
Flask | 37,139 | 1.0.2 |
Aiohttp | 40,986 | 3.3.2 |
Sanic | 116,195 | 0.7.0 |
Vibora | 361,685 | 0.0.6 |
More benchmarks and info at https://github.com/vibora-io/benchmarks