Skip to main content

Httpx transport that port-forwards into Kubernetes cluster

Project description

Httpx transport for Kubernetes

This is a plugin for the next generation HTTP client for Python that makes it possible to easily connect to local ports on pods in kubernetes, similar to kubectl port-forward.

Example:

import httpx
from httpx_kubernetes import KubernetesPortForwardTransport

mounts = {'kube://': KubernetesPortForwardTransport(context='mycontext')}
# alternatively, create the CoreV1Api and pass it as 'api' keyword argument

async with httpx.AsyncClient(mounts=mounts) as c:
    response = await c.get('kube://podname.namespace:80/index.html')

Feel free to copy this code in your project to avoid dependency.

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

httpx_kubernetes-0.1.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

httpx_kubernetes-0.1.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file httpx_kubernetes-0.1.1.tar.gz.

File metadata

  • Download URL: httpx_kubernetes-0.1.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Darwin/24.1.0

File hashes

Hashes for httpx_kubernetes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f3e5941f7de53c4d1f76866688c135ed6d1fddd7a154bcd4608107672a3aa7d1
MD5 713181103b5eec2b0ecc3959045e67a5
BLAKE2b-256 60a919d765c6b0c6902664105d337f23143d543538fd01b46dd21db83ec77e4a

See more details on using hashes here.

File details

Details for the file httpx_kubernetes-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: httpx_kubernetes-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Darwin/24.1.0

File hashes

Hashes for httpx_kubernetes-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0467ed63781cfb6be99a6bc8b56f4f3175684f0672795262fcb7dd04b7c7d2c
MD5 6fd09b3bec56999844a2c3414b75d243
BLAKE2b-256 29cf189b72b6a6e8f6356a4d50e68c6bf836e66fb3d9ca041352b96f3edc7937

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page