python/kubernetes/base
Andrew Melnick 488518d957 Enable binary support for WSClient
Currently, under python 3, the WSClient decodes all data via UTF-8. This
will break, e.g. capturing the stdout of tar or gzip.
This adds a new 'binary' kwarg to the WSClient class and websocket_call
function. If this is set to true, then the decoding will not happen, and
all channels will be interpreted as binary.
This does raise a slight complication, as the OpenAPI-generated client
will convert the output to a string, no matter what, which it ends up
doing by (effectively) calling repr(). This requires a bit of magic to
recover the orignial bytes, and is inefficient. However, this is only
the case when using the default _preload_content=True, setting this to
False and manually calling read_all or read_channel, this issue does not
arise.
2024-02-28 15:41:24 -07:00
..
.github removed submodule 2022-01-07 16:17:39 -08:00
config Merge pull request #2187 from tomplus/fix/mergin-current-context 2024-02-12 10:32:16 -08:00
dynamic Return empty list when there is no matching resource instsnce items to return 2023-11-28 14:02:58 +05:30
hack removed submodule 2022-01-07 16:17:39 -08:00
leaderelection Fix typos 2023-01-27 11:10:29 +08:00
stream Enable binary support for WSClient 2024-02-28 15:41:24 -07:00
watch Handled UTF-8 edge cases in Watch 2023-08-07 12:20:31 -07:00
.gitignore removed submodule 2022-01-07 16:17:39 -08:00
.travis.yml removed submodule 2022-01-07 16:17:39 -08:00
code-of-conduct.md removed submodule 2022-01-07 16:17:39 -08:00
CONTRIBUTING.md removed submodule 2022-01-07 16:17:39 -08:00
LICENSE removed submodule 2022-01-07 16:17:39 -08:00
OWNERS removed submodule 2022-01-07 16:17:39 -08:00
README.md removed submodule 2022-01-07 16:17:39 -08:00
run_tox.sh Fix typo: kubenetes -> kubernetes 2022-03-28 19:52:37 +08:00
SECURITY_CONTACTS removed submodule 2022-01-07 16:17:39 -08:00
tox.ini removed submodule 2022-01-07 16:17:39 -08:00

python-base

Build Status

This is the utility part of the python client. It has been added to the main repo using git submodules. This structure allow other developers to create their own kubernetes client and still use standard kubernetes python utilities. For more information refer to clients-library-structure.

Contributing

Please see CONTRIBUTING.md for instructions on how to contribute.