Running the FastAPI project
Naturally, we can run the FastAPI project by clicking the green arrowed run button near position (2) in Figure 9.2. If you’ve skipped the chapter on setting up and using run and debug configurations, you might want to peek at Chapter 6, Seamless Testing, Debugging, and Profiling, for details on how this feature works in PyCharm. You can see my program running in Figure 9.3:
Figure 9.3: I clicked the green run button, which spawned a tab in the run window for my project in PyCharm
This looks similar to the runs in Flask, but there isn’t a warning about the development server. This is because FastAPI runs in an application called uvicorn
, which is a variant of Green Unicorn (gunicorn
). Uvicorn is production ready, so there is no warning. You can develop using the same application server software you will use when you deploy your application to your customers. The difference between uvicorn
and gunicorn
, which is...