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
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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for service_bindings-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 194ff516b159640fbce6c710393da1ca637761d97e27262fe784a4720f5a36b3 |
|
MD5 | aec70beae7bf30ce4bca042d482edf44 |
|
BLAKE2b-256 | b592ca72985e49f0dcdca5508bb4157161465858ffa4f58e5c65d01d7b6729fa |