/pyfcgiclient

Python client interface to FastCGI servers

Primary LanguagePython

pyfcgiclient

A Python client interface to FastCGI servers.

This code is mostly modified code found in the ZTC project on BitBucket, which in turn is based on code from flup.

Please note that this is still very much a WIP. Any comments and patches are welcome.

Example

from pyfcgiclient.fpm import FPM

phpfpm = FPM(
    host='127.0.0.1',
    port=9000,
    document_root='/var/www/'
)

post_string = 'title=Hello&body=World!'

status_header, headers, output, error_message = phpfpm.load_url(
    url='/index.php?a=b',
    content=post_string,
    remote_addr='192.0.43.10',
    cookies='c=d;e=f;'
)

TODO

  • Create setup
  • Fix unicode/ASCII errors