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.
Thanks Read the Docs!
- 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 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
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.
- Simple request handling
- Dynamic routing
- Keystone Token Validation
- Role Based Access Controls (Based on EOM)
This software library is released to you under the MIT License. See LICENSE for more information.