Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python connector for the Shadow Daemon web application firewall

Project Description

Shadow Daemon is a collection of tools to detect, record and prevent attacks on web applications. Technically speaking, Shadow Daemon is a web application firewall that intercepts requests and filters out malicious parameters. It is a modular system that separates web application, analysis and interface to increase security, flexibility and expandability.

This component can be used to connect Python applications with the background server.


For the full documentation please refer to


You can install the package with easy_install or pip:

easy_install shadowd
pip install shadowd

It is also possible to clone this repository and install the package manually:

python install

You also have to create a configuration file. You can copy misc/examples/connectors.ini to /etc/shadowd/connectors.ini. The example configuration is annotated and should be self-explanatory.


To protect CGI applications you simply have to load the module:

import shadowd.cgi_connector


Django applications require a small modification. It is necessary to create a hook to intercept requests. To do this create the file middleware/ in the application directory:

from shadowd.django_connector import InputDjango, OutputDjango, Connector

class ShadowdConnectorMiddleware(object):
    def process_request(self, request):
        input = InputDjango(request)
        output = OutputDjango()

        status = Connector().start(input, output)
        if not status == True:
            return status

There also has to be an empty file in the middleware directory. Next you have to register the middleware in the file of your application:

    # ...

The connector should be at the beginning of the MIDDLEWARE_CLASSES list.


Flask applications require a small modification as well. It is necessary to create a hook to intercept requests:

from shadowd.flask_connector import InputFlask, OutputFlask, Connector

def before_req():
    input = InputFlask(request)
    output = OutputFlask()

    Connector().start(input, output)

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(13.0 kB) Copy SHA256 Hash SHA256
Wheel py2 Jan 12, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate