Replies: 5 comments
-
Same way you run it in development using uvicorn directly: uvicorn main:app |
Beta Was this translation helpful? Give feedback.
-
is it possible without Uvicorn ? |
Beta Was this translation helpful? Give feedback.
-
FastAPI is based on ASGI (and created on top of Starlette which requires an ASGI server - see https://www.starlette.io/ <https://www.starlette.io/>). Doesn’t appear that you can run it without an ASGI server. If you are looking for something super-lightweight what about https://aiohttp.readthedocs.io/en/stable/ <https://aiohttp.readthedocs.io/en/stable/>
… On Aug 18, 2019, at 11:12 AM, Nikos Skalis ***@***.***> wrote:
is it possible without Uvicorn ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#443>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AACZF524PJTUIELJP4243HTQFFRGPANCNFSM4IMTGBWQ>.
|
Beta Was this translation helpful? Give feedback.
-
thank you |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help @wshayes ! 👏 🍰 @nskalis Responder is based on Starlette. And it uses Uvicorn underneath. So, it's more or less the same to use Uvicorn with FastAPI. Is just that FastAPI doesn't enforce it. You could also use Hypercorn if you need HTTP2/QUIC, Daphne, or others. But Uvicorn should do it. |
Beta Was this translation helpful? Give feedback.
-
Description
How can I run a FastAPI instance without using (g)unicorn ?
Is it possible to use sth like https://github.com/taoufik07/responder
run
method ?Additional context
I really don't need (g)unicorn to run a http api (a prometheus client) receiving 1 request per second, hence the question :)
Beta Was this translation helpful? Give feedback.
All reactions