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.
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;'
)
- Create setup
- Fix unicode/ASCII errors