Blackgate is an API gateway application. It’s stateless and extendable.
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", ...
Metadata
Release files for blackgate 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| blackgate-0.3.0.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| blackgate-0.3.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 17.3 kB
Release files / blackgate-0.3.0.tar.gz
| Download URL | blackgate-0.3.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8b4056eb92665fd885dfcda1b8a9255c5ff01874b0052ac7246ce319c656dce
|
|
BLAKE2b-256 checksum How to use checksums |
f46bc2155ec6c347281cc7639d44b17f42a3b3ab48169b5e77b48bd906b5272a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Release files / blackgate-0.3.0-py2.py3-none-any.whl
| Download URL | blackgate-0.3.0-py2.py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5e84bc0ffeb87000310ad953e99ff46e2825d2fde9a2bd5ae4a552a933973248
|
|
BLAKE2b-256 checksum How to use checksums |
b5e4e43fb2fc72c9345c8ad972fb4f5f6eb3ebbaac2e50e1af1e1b23f6fde53d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|