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.4.tar.gz (18.4 kB view details)

Uploaded Source

Built Distributions

aio_kong-0.5.4-py3.7.egg (24.3 kB view details)

Uploaded Source

aio_kong-0.5.4-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aio-kong-0.5.4.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for aio-kong-0.5.4.tar.gz
Algorithm Hash digest
SHA256 8105fd57a703f731913e854f4f29f0114f61de786f91b9f335329f36c6254e93
MD5 e94a9d8e851232a091940866f5cc0854
BLAKE2b-256 dd7cec9bb1b2f90449b8ad5d7f98afa5b5577d2ff990d037851fb30aff4a903a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: aio_kong-0.5.4-py3.7.egg
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for aio_kong-0.5.4-py3.7.egg
Algorithm Hash digest
SHA256 5fd74c2289c61ab7a7fc049b1ad9d4c9387330a99cab8239470e8732d19c4cb8
MD5 9d84200d41d0ca1f7eaa58178f8d1db6
BLAKE2b-256 c60d8074d6ad77bf4aae17de654a0b962e6aac1af50fee271e184d11fef84b7a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: aio_kong-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for aio_kong-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 11fc113b984e72b671eea626e292c5b079bdc98eabba94c33f1d2c58700f1dd8
MD5 2a05777c1f1ac14ca7c20d60725ae238
BLAKE2b-256 08f9fa709cea9d3ab6c56590c7d5946d389d854ab733b6d4f969507ccee76049

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