Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Embed Python in NGINX.

License

NotificationsYou must be signed in to change notification settings

decentfox/nginxpy

Repository files navigation

Documentation StatusUpdates

Embed Python in NGINX.

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
  • Pythonlogging module redirected to NGINXerror.log
  • (ongoing) NGINX event loop wrapped as Pythonasyncio interface
  • (TBD) Python and Cython interface to most NGINX code
  • (TBD) Adapt NGINX web server to WSGI, ASGI and aiohttp interfaces

Installation

  1. Install NGINX in whatever way, make surenginx command is available.
  2. pip install nginxpy, or get the source and runpip install .. Youmay want to add the-v option, because the process is a bit slowdownloading Cython, NGINX source code and configuring it. The usualpythonsetup.py install currently doesn't work separately - you should runpython setup.py build first.
  3. Runpython -c 'import nginx' to get NGINX configuration hint.
  4. Update NGINX configuration accordingly and reload NGINX.
  5. Visit your NGINX site, see NGINXerror.log for now.

Development

  1. Install NGINX in whatever way, make surenginx command is available.
  2. Checkout source code.
  3. Runpython setup.py build && python setup.py develop.
  4. Runpython -c 'import nginx' to get NGINX configuration hint.
  5. Update NGINX configuration accordingly and reload NGINX.
  6. Visit your NGINX site, see NGINXerror.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 ithere:http://nginx.org/en/docs/dev/development_guide.html

Credits

This package was created withCookiecutter and theaudreyr/cookiecutter-pypackage project template.

About

Embed Python in NGINX.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp