Metadata-Version: 2.0
Name: blackgate
Version: 0.2.4
Summary: A set of utilities to build API gateway.
Home-page: https://github.com/soasme/blackgate
Author: Ju Lin
Author-email: soasme@gmail.com
License: MIT
Keywords: microservices,api,gateway,server,production,
Platform: any
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Requires-Dist: PyYAML (>=3.11)
Requires-Dist: click (>=6.0)
Requires-Dist: futures (>=3.0.5)
Requires-Dist: tornado (>=4.3)

Blackgate
=========

Blackgate is an API gateway application.  It's stateless and extendable.

Install via pip
---------------

Run::

    $ pip install blackgate==0.2.3

Or::

    $ git clone git@github.com:soasme/blackgate.git
    $ cd blackgate
    $ python setup.py install

Install via docker
-------------------

Run::

    $ docker pull blackgate:v0.2.3


Example
--------

Configure Upstream
```````````````````

A minimal Blackgate config looks something like this::

    ---
    proxies:
      - name: github
        upstream_url: 'https://api.github.com'
        request_path_regex: /github/(.*)
        request_path_sub: /\1

Just save it as `blackgate.yml`.

Run Application
```````````````````


Run application::

    $ blackgate -c ./blackgate.yml start


Or via docker::

    $ docker run -it --rm --name blackgate \
        -p 9654:9654 \
        -v blackgate.yml:/etc/blackgate.yml blackgate:v0.2.3

Test Blackgate
```````````````````

Using `curl` to test functionality::

    $ curl http://127.0.0.1:9654/github/repos/soasme/blackgate
    {"id":59739087,"name":"blackgate","full_name":"soasme/blackgate", ...




