Tests about a simple python3 fastcgi runner using libfcgi and the Python-C API.
python
c
wsgi
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Yann Weber 8e452c4087 Using FCGIlib OS_IpcClose and increase monitor watchdog timeout 1 month ago
docs Fixes #40 Fixing doxygen documentation 1 year ago
include Using FCGIlib OS_IpcClose and increase monitor watchdog timeout 1 month ago
src Using FCGIlib OS_IpcClose and increase monitor watchdog timeout 1 month ago
tests Fixing logger test 1 year ago
AUTHORS Add missing am files 1 year ago
COPYING Add autotools & checks 1 year ago
ChangeLog Add missing am files 1 year ago
Makefile.am Autotools enhancement 1 year ago
NEWS Add missing am files 1 year ago
README Fixes #32 set stderr non-blocking 1 year ago
autogen.sh Autotools enhancement 1 year ago
benchmarks Add 120s siege benchmarks 1 year ago
configure.ac Autotools enhancement 1 year ago
foo.py 1st fonctionnal implementation of both python<->C IPC 1 year ago
foo_pep333.py Add tests for stdout & stderr in foo_pep333.py example 1 year ago
includes_python3.7m.patch Initial commit 1 year ago

README

Patch python3 headers :
-----------------------
# cd /usr/include/python3.7m/
# patch -p1 < PATH_TO/includes_python3.7m.patch

Building & running pyfcgi :
---------------------------
$ ./autogen.sh
$ ./configure
$ make
# To run foo_pep333.entrypoint() PEP333 application
$ ./src/pyfcgi -l '127.0.0.1:9000' -v -e foo_pep333 -E entrypoint
or
# To run foo.entrypoint() sending to FCGI python stdout
$ ./src/pyfcgi -l '127.0.0.1:9000' -v -e foo -E entrypoint -A


configure script determine python flags, libs & includes paths using
python3-config programm. The path can be specified using the
PYTHON_CONFIG_PATH environment variable.

Example : linking against a debug build of python :
---------
$ ./configure PYTHON_CONFIG_PATH=/usr/bin/python3dm-config --enable-debug
$ make clean && make
$ valgrind --log-file=/tmp/val.log --trace-children=yes src/pyfcgi -S -e foo_pep333 -E entrypoint -L '/tmp/foo.log;0xff;{datetime} {msg} {ident}'

logging to file example :
-------------------------
-L '/tmp/foo.log;0xff;{datetime} {msg} {ident}'

uwsgi equivalent :
------------------
uwsgi_python3 --fastcgi-socket 127.0.0.1:9000 --module foo_pep333:entrypoint --processes=5