Skip to content

aelkikhia/pyrox

 
 

Repository files navigation

Build Status

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 ontop 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

  • Debian packaging targeting Ubuntu 12.04 LTS
  • 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. The cython dependency has been stored in tools/dev-requires in the case where the software is being installed as a pre-built package. For development use cases, installing cython is required.

pip install -r tools/dev-requires -r tools/pip-requires -r tools/test-requires
python setup.py build && 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.

About

The high-speed HTTP middleware proxy for python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 75.5%
  • C 22.3%
  • Shell 2.2%