Python - Kong Client
This is a Python library for the Kong admin API.
It was build around kong 1.14.x specifications
Installation
PypI
pip install python-kongclient
Manual
- Clone the repository
git clone git@github.com:haintd/python-kongclient.git - Enter it
cd python-kongclient - Install it
python setup.py install
Instructions
Import into your project
from kongclient import KongClient
Create a kong client
kong_client = KongClient(kong_url='https://localhost:8444', verify_ssl=True)
kong_client.services.create(name='httpbin', url='https://httpbin.org')
kong_client.services.add_route(service_id='httpbin', name='route', hosts=['httpbin.org'])
kong_client.routes.list()
...
For Python-Flask
from flask import Flask
from kongclient.flask import KongClient
app = Flask(__name__)
app.config['KONG_ADMIN_URL'] = 'https://localhost:8444'
app.config['KONG_ADMIN_VERIFY_SSL'] = True
kong_client = KongClient(app)
@app.route('/services', methods=['GET])
def get_services():
return kong_client.services.list()
For more details, checkout kong documentation
Metadata
Release files for python-kongclient 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-kongclient-1.1.1.tar.gz | 10.9 kB | Without provenance | Details for python-kongclient-1.1.1.tar.gz |
Release files / python-kongclient-1.1.1.tar.gz
| Download URL | python-kongclient-1.1.1.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7098d36d7a69a839b0a47c62efdbf17004fa97a66d6c58ae2e587155dd081c72
|
|
BLAKE2b-256 checksum How to use checksums |
b33a95a26b451056209d8c50e4dc8c385a809abb224c0da399ca9fd70520c166
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.7
|
Security for python-kongclient 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.