Skip to content

nebhale/client-python

Repository files navigation

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.

About

Service Bindings for Kubernetes Python Client

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages