Skip to content

gregdurham/python-kong-client

 
 

Repository files navigation

Python Kong Client

Description

This is a small library to provide kong server administration functionality inside your python application

This library is currently in version 0.1.3 and it was built around kong 0.12.x specifications

Features

Supported operations for Apis, Consumers and Plugins

  • create
  • delete
  • retrieve
  • update
  • list
  • count

Supported additional operations for Plugins

  • retrieve_enabled
  • retrieve_schema

Not supported

  • update_or_create
  • Information routes (yet)
  • Certificates object routes (yet)
  • SNI object routes (yet)
  • Upstream object routes (yet)
  • Target object routes (yet)

Usage

Install

$ python setup.py install

Import into your project

from kong.kong_clients import KongAdminClient

Creating a kong api

KONG_ADMIN_URL = 'http://localhost:8001/'
kong_client = KongAdminClient(KONG_ADMIN_URL)

kong_client.apis.create(api_name,  # Any string
                        api_upstream_url,  # Url string 'http://foo.bar/something"
                        uris=api_uris) # List of uri strings

for more info checkout kong documentation

Development

setup

$ npm install
$ git hooks install
$ pip install -r requirements.txt

testing

$ pytest

About

python kong library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.5%
  • Shell 2.5%