Manage Repos from k8s
This Python package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.PythonClientCodegen
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/jonathan-kosgei/kubeRepo.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/jonathan-kosgei/kubeRepo.git
)
Then import the package:
import kube_repo
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import kube_repo
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import kube_repo
from kube_repo.rest import ApiException
from pprint import pprint
# Configure API key authorization: Bearer
kube_repo.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# kube_repo.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = kube_repo.DefaultApi()
namespace = 'namespace_example' # str | The Repo's namespace
name = 'name_example' # str | The Repo's name
try:
# Gets a specific Repo
api_response = api_instance.apis_git_k8s_com_v1_namespaces_namespace_repos_name_get(namespace, name)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->apis_git_k8s_com_v1_namespaces_namespace_repos_name_get: %s\n" % e)
All URIs are relative to https://kubernetes.default.svc
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | apis_git_k8s_com_v1_namespaces_namespace_repos_name_get | GET /apis/git.k8s.com/v1/namespaces/{namespace}/repos/{name} | Gets a specific Repo |
DefaultApi | apis_git_k8s_com_v1_repos_get | GET /apis/git.k8s.com/v1/repos | Gets Repos |
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header