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.2.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.2-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: httpx_kubernetes-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 73d1c82a1b8eb80cbfd25f89fb1e72fbee7759bc45661569e27ac4c0e19346c1
MD5 65a4ef3a80f1849d0fd314724946a85f
BLAKE2b-256 2abbbc796152f3667b0d36ad446101826a54bcb54cc0cb56464f5018698db8a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: httpx_kubernetes-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 487aba4cfda144cfa44189835e400e05637a35bdb7231553547ca47dde091ca3
MD5 1a10553cf76262be0c3882b89ce455a1
BLAKE2b-256 f3ed4a1b5eb8f791bf27c727fbe88da5df3e9e38dfd39153d42c501e312ac898

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