search close

Python Module Install

access_time Updated Dec 6, 2022

IMPORTANT: Support for the Python and PHP modules will be moving to self-service in March 2023. At that time, you may continue to use the modules at your own discretion, but we will no longer update and provide technical support for the modules. Until the transition occurs, we will fully support both modules. More information about this transition will be posted at a later date. Reach out to your account manager or securitysupport@fastly.com if you have any questions about this transition.

Compatibility

The Signal Sciences Python module is compatible with latest Python 2.X and 3.X

Installation

  1. Install the Signal Sciences Python module via pip:

    pip install https://dl.signalsciences.net/sigsci-module-python/sigsci-module-python_latest.tar.gz
  2. In the setup.py file of your Flask application, add the following line to reference the sigscimodule package:

    packages = ['flask', '......', 'sigscimodule']
  3. In the app.py file of your application, add the following line to import the import the sigscimodule middleware:

    from sigscimodule import Middleware
  4. Below the from sigscimodule import Middleware line, wrap the application object to apply the sigscimodule middleware:

    app.wsgi_app = Middleware(app.wsgi_app)