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!

Wrapper to integrate CGI scripts into django views.

Project Description

Wrapper to integrate CGI scripts into django views.

Simple function to wrap old-style CGI scripts/binaries to integrate them into the views of a django app.

This method preserves the shortcommings of the CGI deployment, but may be adequate when the performance hit caused by CGI spawning a new process for each request is negligible, a legacy CGI executable needs to be embedded in a new application or the ease of deployment is a priority.

Data returned by the CGI will be streamed to the client.


from django_cgi_wrap import cgi_wrap

def example_view(request):
    return cgi_wrap(request, "/usr/bin/mapserv")

Also see the “tests” directory for a working example as well as the doc-strings of the module itself.

Release History

Release History

This version
History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_cgi_wrap-0.2.0.tar.gz (3.5 kB) Copy SHA256 Checksum SHA256 Source Jul 8, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting