Kubernetes Port-Forward Go-Edition For Python
Project description
portforward
Kubernetes Port-Forward Go-Edition For Python
Free software: MIT license
Documentation: https://portforward.readthedocs.io.
Quickstart
import requests
import portforward
def main():
namespace = "test"
pod_name = "web"
local_port = 9000 # from port
pod_port = 80 # to port
# No path to kube config provided - will use default from $HOME/.kube/config
with portforward.forward(namespace, pod_name, local_port, pod_port):
response = requests.get("http://localhost:9000")
print(f"Done: \n'{response.status_code}'\n'{response.text[:20]}...'")
if __name__ == "__main__":
main()
Features
Go native Kubernetes port-forwarding with the .kube/config from the home dir or any other path to config.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
This project is enabled by setuptools-golang.
History
0.2.1 (2021-08-19)
Decrease binary size if pre-compile wheels (Improvement of setuptools-golang)
0.2.0 (2021-08-14)
First Release on PyPI.
Made path to kube config variable.
Port-forwarding became non-blocking.
Fixed verification bug when port was None.
Added throwing own error.
0.1.0 (2021-08-09)
First release on Test PyPI.
Blocking port-forward with fixed path for kube config.
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 Distributions
Hashes for portforward-0.2.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ce08a8ae7bcd74a447b2db415d6617bda27536f0b31c12e05bf5895b086890 |
|
MD5 | 2d78db49f37832929a87856bc09f2268 |
|
BLAKE2b-256 | 24ad7c892c9dce9aefa31ee1b7a6449dc13802ff9400aedb3e1fcb81ab271737 |
Hashes for portforward-0.2.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88be52965882aa7efade42f61e4114f473a9f43cb8c1e7f9d853c6a1dcb0ed0a |
|
MD5 | 2a11723f623af78a4643835e8002519e |
|
BLAKE2b-256 | 271ed2c9208596a1bc4ab5188da0a783c6e0df266d0b10a90920cb4203fdbc98 |
Hashes for portforward-0.2.1-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2759eee000cc9c2ccbda4db733116878f294b075af730f50528ed9714b12d55 |
|
MD5 | c675cd1570722f0a06512cb3848836a0 |
|
BLAKE2b-256 | 75b8d6a03e42b773b88a36d085e8e12722a74c22c453bbc4004ec985a6005e1f |
Hashes for portforward-0.2.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a9d133e1315ad1ee7b6239290ef7783d2274c1d47557ba8c436c438009734ff |
|
MD5 | 7bce3b3bc1b64ecb8ca063bcb799fac7 |
|
BLAKE2b-256 | d8549b121fd615e8c691ba763feac5c348e7759896a49672d9c9fe686eb62a59 |
Hashes for portforward-0.2.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 169ad8cc3c00e0ce4cafdbe8c35a0f0ae48d0a0e6f4eab32d9b95a247bea46e9 |
|
MD5 | 6ee2ca29b9678d5576908969b02ac8a6 |
|
BLAKE2b-256 | dfb62d2543eef9dbfe2b538a886b64a1021dafea10f5ea934fc6516af10eceda |
Hashes for portforward-0.2.1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aafb4350c2ce70f9749b66fef2631a7b2bd98868bb07d1c20d59b8de1d19b856 |
|
MD5 | ae331c963eddd56f22727dd6ce5c2289 |
|
BLAKE2b-256 | c18c407bff77e02607234971b16c84adcae19d15bb01903f0d3cb620c925d7a8 |
Hashes for portforward-0.2.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04f4a0221e442a9198d621c323a2a7201a0d8bb5eb57e5f8e77e295a0cbc03a9 |
|
MD5 | f887cd3d3248a004be2e45491cf50805 |
|
BLAKE2b-256 | fd1f0407d6e11b726dc0334878c7ba59e05ad74fd675ebe18c8ff6b3049a661e |
Hashes for portforward-0.2.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18eb887c0328c2639dd900ca2d59c0b09d7d713d7abd124cfa5f740233681de0 |
|
MD5 | 27142c3dc0ac812f7e652f8370329235 |
|
BLAKE2b-256 | 708389591585b48826b7969fa8dbfe8d07dca54d5977ac9ddea0a77935fc5c62 |
Hashes for portforward-0.2.1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feb8f5c881e45efc7518cb9dddd84ecc58d57eef35243001f741d5abf8563398 |
|
MD5 | 49d23ae58873e2ec567a9438006e6b11 |
|
BLAKE2b-256 | dc80866714915c2c8313cc44f02f30206699467fbd412905e93ffa5e8b92182a |
Hashes for portforward-0.2.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e0362ef3631dfcf21c7940334c5e9a27ce929f81d7573c2ca28d5761f3b06b3 |
|
MD5 | ec682697b7bf1937ab1ecde0ea909ac1 |
|
BLAKE2b-256 | 22abd27eadc517a703dca0a095f65aad745c65b3e7967004ada418fe4106ee87 |
Hashes for portforward-0.2.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1286a953a6fb2e4135287f03e0c4640581f52616311829c69129e1fff69dabbf |
|
MD5 | a6543f51d9fa3251f497ab6833de3fe6 |
|
BLAKE2b-256 | 704397b06199f964e2fb4a2e646ca024bc64a2e331d810d990a10af250c04bee |
Hashes for portforward-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f7757de2754bb6df5971a0a0da2f8995c220b944890ef232b7842efd3c8243d |
|
MD5 | 300feb8fac0d536c8378fadbd35860f4 |
|
BLAKE2b-256 | bf12c37ed63f35b746facc00dd00c17c25286ac5afcc11f36c4f59cefdb39bcb |