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.3 (2021-08-23)
Fixed case when hostIP contains a path
Added common and cloud provider auth plugins
0.2.2 (2021-08-23)
Fixed missing module portforward
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.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba723df275bc6e9168bf1926350da644fd94a86a6f012f3a3a4818ab112276da |
|
MD5 | 4f0d633709fd2833841ae4ed65aba30b |
|
BLAKE2b-256 | 6399a9f974f34a4b4f8c559aa36698e39de75a1e9e4e94911acaff9398f9bc27 |
Hashes for portforward-0.2.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff6ba2b3fad26f2a524593dae85bec7235c212b9e0912f820879d29a93df16fb |
|
MD5 | 229ac97d6e8529b3a37597cfc5ff70d1 |
|
BLAKE2b-256 | 0e904cb4e26893e0248bb48388ac805799201647435a66b77b34bc05ec00ced6 |
Hashes for portforward-0.2.3-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e38cf3efe571a2daac627e6f7ac26e2685ba7a96da8f27ff109c852aeab7e56 |
|
MD5 | 2f2e9b3b8b5e0196c3326687d5c632e0 |
|
BLAKE2b-256 | 9fa69229916086adaa9aa8e131851655b954969b3207131a5a18ceade45969d6 |
Hashes for portforward-0.2.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a637d0d8c85372a8113e4449c5bcf1e03c16f5f229f6cb2235f6660daa4551a |
|
MD5 | c9e6593dc7d267dd39a20905c30c0efb |
|
BLAKE2b-256 | be2748cac1e1939047caaf2a507d55fc8b6d44f9b404cf4d9d42cbf08622bc7b |
Hashes for portforward-0.2.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 063d4a9ec854bce92262eaa9f7f7c05b7cc0c983a974050b6a65f5dc0068f6a4 |
|
MD5 | be3fb48d292e50eaa621684db586b021 |
|
BLAKE2b-256 | aad300bc1f425896fdcb5137c783cc7f4b54b416176a521f1f0ef7f4e952baf8 |
Hashes for portforward-0.2.3-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23b5881e1f091c1abdee94f8271de0bdedd29215a20421f5f5aad81689c7b876 |
|
MD5 | a697ff5a03c62011e3019272d4e864b4 |
|
BLAKE2b-256 | 5e6449c65dcf379e20dd9b64c493a82068e747b4eb7c7b6879a785ed53bf6697 |
Hashes for portforward-0.2.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cca28597bcc6612044da286f4c0b892e8f84b1b0a265336904f8e639c83e27f |
|
MD5 | adabaf0a3275613ef90427771a79b0e9 |
|
BLAKE2b-256 | 3b0e24ee220d72d1a630de8af65e17a3935219733287fa770e81781a7ab21b6a |
Hashes for portforward-0.2.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e46d6417687e4bca4489d7c76dbbca9b219fcc09b24b2a0f0f410cb7b50266b |
|
MD5 | 3ad6c56d224b85ff4ff946f693ab7310 |
|
BLAKE2b-256 | aa9b61ffbe151357ba02eed9434814808d81384172f2a609c98aec730066570c |
Hashes for portforward-0.2.3-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c838f93b06c745c86adccd3c472cf0dc843beafff6d0702893d103f3b86a8e15 |
|
MD5 | 812e7e0402989aa76c33a9d8663efc21 |
|
BLAKE2b-256 | 4572c560b99aaf82245d5320063a6ebd1581cae29787e9373d8746ffaf926b96 |
Hashes for portforward-0.2.3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13760ce7d13945ed2bdaa8251064a8ebf1b134dcbd1d8110d3209bbb9e056538 |
|
MD5 | 69e15edb898d11a7bf429b66300c7918 |
|
BLAKE2b-256 | 80c95f8348cb31fc1c649f32bdee3d117e59a1ad18fbe9b839e5baa906a3288a |
Hashes for portforward-0.2.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4234167e664370365e7ebf8178a8219a40bfd44df165347fa54f39cdb452f4d |
|
MD5 | 8a57e490a8e3ca7804e7a19b244357b2 |
|
BLAKE2b-256 | fd30d8722cd30389ca9363f20856293d672a074b8243d18e3b699c2ddb1783d5 |
Hashes for portforward-0.2.3-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0714870c6f729ecb042f07db477ec37ce1e9ace2562e634f4974e321ce60b32b |
|
MD5 | 803d334d63b4fffbec6d88934638006d |
|
BLAKE2b-256 | 12340e47d9faf26d3547897d7f62279a5a6212349d85529d02e71791116d8593 |