Python Falcon - Environment Setup



The latest version of Falcon requires Python 3.5 or newer version. The easiest as well as recommended way to install Falcon is with PIP installer, preferably in a virtual environment.

The latest stable version can be installed by running the following command −

(myenv) D:\Projects\python\myenv>pip3 install falcon
Collecting falcon
  Downloading falcon-4.2.0-cp314-cp314-win_amd64.whl.metadata (38 kB)
Downloading falcon-4.2.0-cp314-cp314-win_amd64.whl (414 kB)
Installing collected packages: falcon
Successfully installed falcon-4.2.0

To verify if the installation has been performed successfully, import the library and check its version.

(myenv) D:\Projects\python\myenv>py
Python 3.14.2 (tags/v3.14.2:df79316, Dec  5 2025, 17:18:21) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import falcon
>>> falcon.__version__
'4.2.0'
>>>

To install the latest beta version, following command should be used −

pip3 install --pre falcon

Right from the early version, Falcon supports WSGI. A Falcon app can be run with the help of built-in WSGI server in Python's standard library module wsgiref. However, it is not suitable for production environment, for which WSGI servers such as gunicorn, waitress or uwsgi are required.

For Falcon on Windows, one can use Waitress, a production-quality, pure-Python WSGI server. As usual, install it with pip installer.

(myenv) D:\Projects\python\myenv>pip3 install waitress
Collecting waitress
  Downloading waitress-3.0.2-py3-none-any.whl.metadata (5.8 kB)
Downloading waitress-3.0.2-py3-none-any.whl (56 kB)
Installing collected packages: waitress
Successfully installed waitress-3.0.2

The Gunicorn server can't be installed on Windows. However, it can be used inside a Windows Subsystem Linux (WSL) environment on Windows 10. For using gunicorn on Linux, WSL or inside Docker containers, use

pip3 install gunicorn

If you want to run an asynchronous Falcon app, an ASGI compliant application server is required. The Uvicorn server can be used on Windows as well as Linux systems.

pip3 install uvicorn
Advertisements