Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Asynchronous Kong client

Project description

Async Python Client for Kong

PyPI version Python versions CircleCI codecov

Tested with kong v1.2.x

Installation & Testing

To install the package

pip install aio-kong

To run tests, clone and

pytest --cov

:warning: If you don't have Kong running locally, you can run your tests on a test environment with :


test certificates were generated using the command

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=localhost'


The client can be imported via

from kong.client import Kong

In a coroutine:

async with Kong() as cli:
    services = await
    print(json.dumps([ for s in services], indent=4))

The client has handlers for all Kong objects

  • CRUD operations on services
  • cli.routes CRUD operations on routes
  • cli.plugins CRUD operations on plugins
  • cli.consumers CRUD operations on consumers
  • cli.consumers CRUD operations on consumers
  • cli.certificates CRUD operations on TLS certificates
  • cli.snis CRUD operations on SNIs
  • cli.acls To list all ACLs

Apply a configuration

The client allow to apply a configuration object to kong:

await cli.apply_json(config)

Command line tool

The library install the kong command line tool for uploading kong configuration files.

kong --yaml config.yaml

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aio-kong, version 0.7.0
Filename, size File type Python version Upload date Hashes
Filename, size aio_kong-0.7.0-py3.7.egg (26.6 kB) File type Egg Python version 3.7 Upload date Hashes View hashes
Filename, size aio_kong-0.7.0-py3-none-any.whl (12.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size aio-kong-0.7.0.tar.gz (20.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page