GuidesThin SDK
Python Thin SDK
Package name, install steps, and Sidecar Session / TargetService usage for pole-client-python.
The Python Thin SDK (pole-client-python) receives Sidecar listeners through gRPC OpenSession on a local UDS and injects TargetService v1 metadata.
Official package
| Item | Value |
|---|---|
| Repository | github.com/lattice-hub/pole-client-python |
| Project name | pole-client-python |
| Import package | pole_client |
| Requirements | Python 3.9–3.13; grpcio>=1.71,<2; protobuf>=5.29,<6 |
Until PyPI publishes a release, install from source:
git clone https://github.com/lattice-hub/pole-client-python.git
cd pole-client-python
python -m pip install .After publication:
python -m pip install pole-client-pythonMinimal usage
Default UDS: /var/run/pole/sidecar/bootstrap.sock, overridable only with POLE_SIDECAR_SOCKET.
from pole_client import ListenerProtocol, SidecarSession, TargetService
session = SidecarSession().start()
try:
grpc_endpoint = session.endpoint(ListenerProtocol.GRPC)
target = TargetService(namespace="default", service="orders")
http_headers = target.to_metadata({"traceparent": "00-..."})
grpc_metadata = target.to_grpc_metadata((("traceparent", "00-..."),))
# Point your business client at grpc_endpoint and pass metadata / headers.
finally:
session.close()endpoint(protocol) returns 127.0.0.1:{port}. Snapshots invalidate immediately when the session drops; adapters should discard old pools on generation changes or SidecarUnavailableError.
Metadata
latticehub-target-namespace
latticehub-target-serviceMerge overwrites same-name caller fields. Values use canonical UTF-8 %HH encoding.
Boundary
- The core package does not proxy business traffic and ships no framework adapters
- End-to-end compatibility is still evolving—see the Thin SDK overview