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
Built Distribution
File details
Details for the file service-bindings-1.0.0.tar.gz
.
File metadata
- Download URL: service-bindings-1.0.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.6 Darwin/20.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac03efec9e9e9ca08363fafa26fd3d9aefc2ffb6476186cddddb9cba81f1e4d7 |
|
MD5 | 6b6cc04a1836f3a71c036dde529c95b0 |
|
BLAKE2b-256 | e8f5a483572732f9d3716bb138ffc5f77ca379f2c4ff4309ae5d5f0f85d6e0c4 |
File details
Details for the file service_bindings-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: service_bindings-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.6 Darwin/20.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 194ff516b159640fbce6c710393da1ca637761d97e27262fe784a4720f5a36b3 |
|
MD5 | aec70beae7bf30ce4bca042d482edf44 |
|
BLAKE2b-256 | b592ca72985e49f0dcdca5508bb4157161465858ffa4f58e5c65d01d7b6729fa |