I've a simple falcon app which I'm running on the terminal using the following command,
gunicorn -b 0.0.0.0:5000 main:app --reload
main.py is the python file which instantiates app = falcon.API(). This works.
So I tried to set this config inside of PyCharm. But this I can't get to run. Here's the PyCharm config window
Can someone help me configure this window to get the app running.
Falcon is a blazing fast, minimalist Python web API framework for building robust app backends and microservices. The framework works great with both asyncio (ASGI) and gevent/meinheld (WSGI).
Looks like you almost got it right already, except you need to set the script to the gunicorn
of your virtual environment, and put the parameters in the appropriate input box.
Use the "three dots" button to the right of the script
input box, and navigate to the virtual environment, there you should find a bin/
directory, inside there should be gunicorn
. Selecting this should have you end up with your input box like this:
/path/to/virtualenv/bin/gunicorn
No parameters, these go into the script parameters
input box below like this:
-b 0.0.0.0:5000 main:app
In the input box working directory
, you set it to the working directory of your app, like this:
/path/to/appdirectory
It is possible that you need to enable gevent compatible
for the debugger, which you can set in File > Settings > Build, Execution, Deployment > Python Debugger
with a checkbox.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With