https://github.com/decentfox/nginxpy
Embed Python in NGINX.
https://github.com/decentfox/nginxpy
application-server nginx python
Last synced: 3 months ago
JSON representation
Embed Python in NGINX.
- Host: GitHub
- URL: https://github.com/decentfox/nginxpy
- Owner: decentfox
- License: other
- Created: 2018-11-29T12:31:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T20:46:42.000Z (over 2 years ago)
- Last Synced: 2024-11-27T03:35:14.741Z (5 months ago)
- Topics: application-server, nginx, python
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 110
- Watchers: 19
- Forks: 15
- Open Issues: 9
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
=======
NGINXpy
=======.. image:: https://img.shields.io/pypi/v/nginxpy.svg
:target: https://pypi.python.org/pypi/nginxpy.. image:: https://img.shields.io/travis/decentfox/nginxpy.svg
:target: https://travis-ci.org/decentfox/nginxpy.. image:: https://readthedocs.org/projects/nginxpy/badge/?version=latest
:target: https://nginxpy.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status.. image:: https://pyup.io/repos/github/decentfox/nginxpy/shield.svg
:target: https://pyup.io/repos/github/decentfox/nginxpy/
:alt: UpdatesEmbed 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 interfacesInstallation
------------1. Install NGINX in whatever way, make sure ``nginx`` command is available.
2. ``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.
3. Run ``python -c 'import nginx'`` to get NGINX configuration hint.
4. Update NGINX configuration accordingly and reload NGINX.
5. Visit your NGINX site, see NGINX ``error.log`` for now.Development
-----------1. Install NGINX in whatever way, make sure ``nginx`` command is available.
2. Checkout source code.
3. Run ``python setup.py build && python setup.py develop``.
4. Run ``python -c 'import nginx'`` to get NGINX configuration hint.
5. Update NGINX configuration accordingly and reload NGINX.
6. Visit your NGINX site, see NGINX ``error.log`` for now.
7. Change code if result is not satisfying, or else go for pull request.
8. Goto 3 if Cython code was changed, or else goto 5.Surprisingly NGINX has a very simple but powerful architecture, learn about it
here: http://nginx.org/en/docs/dev/development_guide.htmlCredits
-------This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage