Skip to main content

Asynchronous Kong client

Project description

Async Python Client for Kong

PyPI version Python versions CircleCI codecov

Tested with kong v1.0.x

Installation & Testing

To install the package

pip install aio-kong

To run tests, clone and

./dev/install.sh
pytest --cov

test certificates were generated using the command

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

Client

The client can be imported via

from kong.client import Kong

In a coroutine:

async with Kong() as cli:
    services = await cli.services.get_list()
    print(json.dumps(services, indent=4))

The client has handlers for all Kong objects

  • cli.services 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.

Source Distribution

aio-kong-0.5.0.tar.gz (18.3 kB view details)

Uploaded Source

Built Distributions

aio_kong-0.5.0-py3.7.egg (24.1 kB view details)

Uploaded Source

aio_kong-0.5.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file aio-kong-0.5.0.tar.gz.

File metadata

  • Download URL: aio-kong-0.5.0.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for aio-kong-0.5.0.tar.gz
Algorithm Hash digest
SHA256 f0619193b74e6cf6e61c66f9df5dee9d3c4ae73ca373e5641da02965b0960068
MD5 d0cbc6a3856d34234063ce399f529af0
BLAKE2b-256 5fd1c0ab405c176efbee0db7447b1589211f69c3f567dfc393f7a325bf71e040

See more details on using hashes here.

Provenance

File details

Details for the file aio_kong-0.5.0-py3.7.egg.

File metadata

  • Download URL: aio_kong-0.5.0-py3.7.egg
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for aio_kong-0.5.0-py3.7.egg
Algorithm Hash digest
SHA256 488af5f2737a1e7c2d2186617a3dbae07518e5afd3cf9f40692d0fd24809bf87
MD5 0a85c17f47fbfaf43583d8e5f653b68b
BLAKE2b-256 d28eae7693e1f0675031944a1f1589558b6c0aeb5142f528f145a714611879ee

See more details on using hashes here.

Provenance

File details

Details for the file aio_kong-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: aio_kong-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for aio_kong-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d78ba059e8edfa9cdc2cf5eca781a6d7840737e2912b1be1495a8fa25164af4
MD5 f424a62791f7c74320e1b3bd9b9e8b75
BLAKE2b-256 a6f4cf3c3ea1a9b58ceed77f4b1d9a182d3ca3df217363ceefe254cb0e7ad3ed

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page