/pyrox

The high-speed HTTP middleware proxy for python

Primary LanguagePythonMIT LicenseMIT

The fast Python HTTP middleware server

What is Pyrox?

Hosted REST Interceptors!

Pyrox is a HTTP reverse proxy that can intercept requests ahead of an upstream HTTP REST service. This allows reuse of common middleware functions like: message enhancement, dynamic routing, authentication, authorization, resource request rate limiting, service distribution, content negotiation and content transformation. These services can then be scaled horizontally separate the origin REST endpoint.

Build on top of the Tornado Async I/O python library, the HTTP code inside Pyrox can scale to thousands of concurrent clients and proxy them to a similar number of upstream REST services.

Documentation

Thanks Read the Docs!

Features

  • Extensive plugin support with the ability to source middleware code from multiple, separate plugin paths
  • Fast HTTP parser written in C with much of the code based on the Joyent HTTP Parser
  • Utilizes Tornado Async I/O
  • Low dependency footprint

Building Pyrox

Building pyrox requires only a few dependencies. For development use cases, installing cython is required.

pip install -r tools/install_requires.txt -r tools/tests_require.txt
python setup.py build_ext --inplace
nosetests

Running Pyrox

After building pyrox you should be able to run it with the proxy shell script located within the project root.

./pyrox_dev.sh

usage: pyrox_dev.sh [-h] [-c [OTHER_CFG]] [-p [PLUGIN_PATHS]] start

Pyrox, the fast Python HTTP middleware server.

positional arguments:
  start              Starts the daemon.

optional arguments:
  -h, --help         show this help message and exit
  -c [OTHER_CFG]     Sets the configuration file to load on startup. If unset
                     this option defaults to /etc/pyrox/pyrox.conf
  -p [PLUGIN_PATHS]  "/" character separated string of paths to import from
                     when loading plugins.

Filter Examples

That Legal Thing...

This software library is released to you under the MIT License. See LICENSE for more information.