flask-gevent-tutorial:如何将Flask与gevent一起使用(uWSGI和Gunicorn版本)

时间:2021-02-05 07:12:23
【文件属性】:
文件名称:flask-gevent-tutorial:如何将Flask与gevent一起使用(uWSGI和Gunicorn版本)
文件大小:13KB
文件格式:ZIP
更新时间:2021-02-05 07:12:23
python nginx flask asynchronous gunicorn 如何将Flask与gevent一起使用(uWSGI和Gunicorn版本) 创建简单的Flask应用程序 首先,我们需要模拟一个慢速的第三方API: # slow_api/api.py import os import asyncio from aiohttp import web async def handle ( request ): delay = float ( request . query . get ( 'delay' ) or 1 ) await asyncio . sleep ( delay ) return web . Response ( te
【文件预览】:
flask-gevent-tutorial-master
----psycopg2()
--------app.py(591B)
--------Dockerfile(301B)
--------patched.py(82B)
----sync-devserver.yml(699B)
----LICENSE.txt(1KB)
----sync-uwsgi.yml(442B)
----sync-gunicorn.yml(426B)
----nginx-uwsgi.yml(626B)
----async-gevent-pywsgi.yml(409B)
----README.md(7KB)
----nginx-gunicorn.yml(584B)
----.gitignore(6B)
----bonus-psycopg2-gevent.yml(905B)
----slow_api()
--------Dockerfile(90B)
--------api.py(349B)
----async-gevent-gunicorn.yml(405B)
----flask_app()
--------Dockerfile-gevent-gunicorn(219B)
--------Dockerfile-gevent-uwsgi(286B)
--------nginx-uwsgi.conf(124B)
--------app.py(326B)
--------Dockerfile-devserver(176B)
--------Dockerfile-uwsgi(219B)
--------pywsgi.py(218B)
--------nginx-gunicorn.conf(306B)
--------Dockerfile-gevent-pywsgi(126B)
--------Dockerfile-gunicorn(177B)
--------patched.py(67B)
----async-gevent-uwsgi.yml(449B)

网友评论