@@ -14,7 +14,7 @@ Python 2.7 and 3.4+
1414## Installation & Usage
1515### pip install
1616
17- If the python package is hosted on Github , you can install directly from Github
17+ If the python package is hosted on a repository , you can install directly using:
1818
1919``` sh
2020pip install git+https://github.com/kubernetes-client/python.git
@@ -23,7 +23,7 @@ pip install git+https://github.com/kubernetes-client/python.git
2323
2424Then import the package:
2525``` python
26- import kubernetes.client
26+ import kubernetes.client
2727```
2828
2929### Setuptools
@@ -51,21 +51,28 @@ import kubernetes.client
5151from kubernetes.client.rest import ApiException
5252from pprint import pprint
5353
54- # Configure API key authorization: BearerToken
5554configuration = kubernetes.client.Configuration()
55+ # Configure API key authorization: BearerToken
5656configuration.api_key[' authorization' ] = ' YOUR_API_KEY'
5757# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
5858# configuration.api_key_prefix['authorization'] = 'Bearer'
5959
60- # create an instance of the API class
61- api_instance = kubernetes.client.AdmissionregistrationApi(kubernetes.client.ApiClient(configuration))
62-
63- try :
64- api_response = api_instance.get_api_group()
65- pprint(api_response)
66- except ApiException as e:
67- print (" Exception when calling AdmissionregistrationApi->get_api_group: %s \n " % e)
60+ # Defining host is optional and default to http://localhost
61+ configuration.host = " http://localhost"
6862
63+ # Defining host is optional and default to http://localhost
64+ configuration.host = " http://localhost"
65+ # Enter a context with an instance of the API kubernetes.client
66+ with kubernetes.client.ApiClient(configuration) as api_client:
67+ # Create an instance of the API class
68+ api_instance = kubernetes.client.AdmissionregistrationApi(api_client)
69+
70+ try :
71+ api_response = api_instance.get_api_group()
72+ pprint(api_response)
73+ except ApiException as e:
74+ print (" Exception when calling AdmissionregistrationApi->get_api_group: %s \n " % e)
75+
6976```
7077
7178## Documentation for API Endpoints
@@ -648,10 +655,10 @@ Class | Method | HTTP request | Description
648655* CoreV1Api* | [ ** replace_persistent_volume_status** ] ( docs/CoreV1Api.md#replace_persistent_volume_status ) | ** PUT** /api/v1/persistentvolumes/{name}/status |
649656* CustomObjectsApi* | [ ** create_cluster_custom_object** ] ( docs/CustomObjectsApi.md#create_cluster_custom_object ) | ** POST** /apis/{group}/{version}/{plural} |
650657* CustomObjectsApi* | [ ** create_namespaced_custom_object** ] ( docs/CustomObjectsApi.md#create_namespaced_custom_object ) | ** POST** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
651- * CustomObjectsApi* | [ ** delete_cluster_custom_object** ] ( docs/CustomObjectsApi.md#delete_cluster_custom_object ) | ** DELETE** /apis/{group}/{version}/{plural} |
652- * CustomObjectsApi* | [ ** delete_cluster_custom_object_0 ** ] ( docs/CustomObjectsApi.md#delete_cluster_custom_object_0 ) | ** DELETE** /apis/{group}/{version}/{plural}/{name } |
653- * CustomObjectsApi* | [ ** delete_namespaced_custom_object ** ] ( docs/CustomObjectsApi.md#delete_namespaced_custom_object ) | ** DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
654- * CustomObjectsApi* | [ ** delete_namespaced_custom_object_0 ** ] ( docs/CustomObjectsApi.md#delete_namespaced_custom_object_0 ) | ** DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} |
658+ * CustomObjectsApi* | [ ** delete_cluster_custom_object** ] ( docs/CustomObjectsApi.md#delete_cluster_custom_object ) | ** DELETE** /apis/{group}/{version}/{plural}/{name} |
659+ * CustomObjectsApi* | [ ** delete_collection_cluster_custom_object ** ] ( docs/CustomObjectsApi.md#delete_collection_cluster_custom_object ) | ** DELETE** /apis/{group}/{version}/{plural} |
660+ * CustomObjectsApi* | [ ** delete_collection_namespaced_custom_object ** ] ( docs/CustomObjectsApi.md#delete_collection_namespaced_custom_object ) | ** DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} |
661+ * CustomObjectsApi* | [ ** delete_namespaced_custom_object ** ] ( docs/CustomObjectsApi.md#delete_namespaced_custom_object ) | ** DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} |
655662* CustomObjectsApi* | [ ** get_cluster_custom_object** ] ( docs/CustomObjectsApi.md#get_cluster_custom_object ) | ** GET** /apis/{group}/{version}/{plural}/{name} |
656663* CustomObjectsApi* | [ ** get_cluster_custom_object_scale** ] ( docs/CustomObjectsApi.md#get_cluster_custom_object_scale ) | ** GET** /apis/{group}/{version}/{plural}/{name}/scale |
657664* CustomObjectsApi* | [ ** get_cluster_custom_object_status** ] ( docs/CustomObjectsApi.md#get_cluster_custom_object_status ) | ** GET** /apis/{group}/{version}/{plural}/{name}/status |
0 commit comments