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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for service-bindings-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ac03efec9e9e9ca08363fafa26fd3d9aefc2ffb6476186cddddb9cba81f1e4d7
MD5 6b6cc04a1836f3a71c036dde529c95b0
BLAKE2b-256 e8f5a483572732f9d3716bb138ffc5f77ca379f2c4ff4309ae5d5f0f85d6e0c4

See more details on using hashes here.

File details

Details for the file service_bindings-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for service_bindings-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 194ff516b159640fbce6c710393da1ca637761d97e27262fe784a4720f5a36b3
MD5 aec70beae7bf30ce4bca042d482edf44
BLAKE2b-256 b592ca72985e49f0dcdca5508bb4157161465858ffa4f58e5c65d01d7b6729fa

See more details on using hashes here.

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