Skip to main content

A library to access [Service Binding Specification for Kubernetes](https://k8s-service-bindings.github.io/spec/) conformant Service Binding [Workload Projections](https://k8s-service-bindings.github.io/spec/#workload-projection).

Project description

client-python

Tests codecov

client-python is a library to access Service Binding Specification for Kubernetes conformant Service Binding Workload Projections.

Example

import psycopg2 as psycopg2

from bindings import bindings

b = bindings.from_service_binding_root()
b = bindings.filter(b, "postgresql")

if len(b) != 1:
raise ValueError("Incorrect number of PostgreSQL bindings: %s" % len(b))

u = b[0].get("url")
if u is None:
    raise ValueError("No URL in binding")

conn = psycopg2.connect(u)

# ...

License

Apache License v2.0: see LICENSE for details.

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

service-bindings-1.0.0.tar.gz (7.8 kB view hashes)

Uploaded Source

Built Distribution

service_bindings-1.0.0-py3-none-any.whl (9.3 kB view hashes)

Uploaded Python 3

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