Embed Python in NGINX.
Project description
NGINXpy
Embed Python in NGINX.
Free software: Apache Software License 2.0
Documentation: https://nginxpy.readthedocs.io.
Features
Standard Python package with Cython extension
Automatically build into NGINX dynamic module for current NGINX install
Run embeded Python in NGINX worker processes
Write NGINX modules in Python or Cython
Python logging module redirected to NGINX error.log
(ongoing) NGINX event loop wrapped as Python asyncio interface
(TBD) Python and Cython interface to most NGINX code
(TBD) Adapt NGINX web server to WSGI, ASGI and aiohttp interfaces
Installation
Install NGINX in whatever way, make sure nginx command is available.
pip install nginxpy, or get the source and run pip install .. You may want to add the -v option, because the process is a bit slow downloading Cython, NGINX source code and configuring it. The usual python setup.py install currently doesn’t work separately - you should run python setup.py build first.
Run python -c 'import nginx' to get NGINX configuration hint.
Update NGINX configuration accordingly and reload NGINX.
See NGINX error.log for now.
Development
Install NGINX in whatever way, make sure nginx command is available.
Checkout source code.
Run python setup.py build and python setup.py develop.
Run python -c 'import nginx' to get NGINX configuration hint.
Update NGINX configuration accordingly and reload NGINX.
See NGINX error.log for now.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2018-11-30)
First release on PyPI with asyncio sleep demo.