blackgate-0.3.0
توضیحات
Blackgate is an API gateway application.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | blackgate-0.3.0 |
| نام | blackgate |
| نسخه کتابخانه | 0.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ju Lin |
| ایمیل نویسنده | soasme@gmail.com |
| آدرس صفحه اصلی | https://github.com/soasme/blackgate |
| آدرس اینترنتی | https://pypi.org/project/blackgate/ |
| مجوز | MIT |
Blackgate
=========
Blackgate is an API gateway application. It's stateless and extendable.
.. image:: https://travis-ci.org/soasme/blackgate.svg?branch=master
.. image:: https://images.microbadger.com/badges/image/soasme/blackgate.svg
:target: https://microbadger.com/images/soasme/blackgate
Install via pip
---------------
Run::
$ pip install blackgate
Or::
$ git clone git@github.com:soasme/blackgate.git
$ cd blackgate
$ python setup.py install
Install via docker
-------------------
Run::
$ docker pull soasme/blackgate
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 --no-daemon start
# or run as a daemon
$ blackgate -c ./blackgate.yml --pidfile=/tmp/blackgate.pid start
# or run via docker
$ docker run -it --rm --name blackgate \
-p 9654:9654 \
-v blackgate.yml:/etc/blackgate.yml blackgate:latest
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", ...
نحوه نصب
نصب پکیج whl blackgate-0.3.0:
pip install blackgate-0.3.0.whl
نصب پکیج tar.gz blackgate-0.3.0:
pip install blackgate-0.3.0.tar.gz