- .github
- devel
- doc
-
examples
-
dynamic-client
-
notebooks
-
watch
-
yaml_dir
- README.md
- __init__.py
- annotate_deployment.py
- api_discovery.py
- apply_from_dict.py
- apply_from_directory.py
- apply_from_single_file.py
- cluster_scoped_custom_object.py
- cronjob_crud.py
- deployment_create.py
- deployment_crud.py
- duration-gep2257.py
- in_cluster_config.py
- ingress_create.py
- job_crud.py
- multiple_clusters.py
- namespaced_custom_object.py
- node_labels.py
- out_of_cluster_config.py
- pick_kube_config_context.py
- pod_config_list.py
- pod_exec.py
- pod_portforward.py
- remote_cluster.py
- rollout-daemonset.py
- rollout-statefulset.py
-
dynamic-client
- kubernetes
- scripts
- .gitignore
- CHANGELOG.md
- CONTRIBUTING.md
- LICENSE
- MANIFEST.in
- OWNERS
- README.md
- SECURITY_CONTACTS
- code-of-conduct.md
- codecov.yml
- requirements.txt
- setup.cfg
- setup.py
- test-requirements.txt
- tox.ini
Explanation
This code snippet from the Kubernetes Python client library’s __init__.py
file serves as the entry point for the library.
__version__
defines the version of the library, currently set to “31.0.0+snapshot”, indicating a development snapshot build.The subsequent lines import key modules from within the library, providing access to different functionalities:
client
: Contains the core client classes for interacting with the Kubernetes API.config
: Handles loading and managing Kubernetes configurations.dynamic
: Provides a dynamic client for accessing any Kubernetes resource without requiring specific API definitions.watch
: Implements functionality for watching Kubernetes resources for changes.stream
: Provides tools for interacting with streams of data, such as logs.utils
: Contains various utility functions and classes.leaderelection
: Supports leader election mechanisms for distributed applications.
This structure allows developers to easily access and utilize the various capabilities offered by the Kubernetes Python client library through the simple import statements, streamlining the interaction with Kubernetes APIs.
Graph
The graph shows the usage of functions within the codebase.
Select a code symbol to view it's graph