----- Original Message ----- > From: "Maciej Szulik" <[email protected]> > To: "Graham Dumpleton" <[email protected]> > Cc: "Charlie Drage" <[email protected]>, "dev" > <[email protected]> > Sent: Friday, October 7, 2016 8:19:27 PM > Subject: Re: Possible integration of a new Python library (kubeshift) to the > Github repo > > Personally I'd like to see a combination of the two, so that you can > smoothly communicate > with k8s/OpenShift API using raw json (Charlie's part),
Some have recently suggested that you shouldn't bother with a special language specific client even for that as you can just use 'oc get --raw'. :-) > but additionally be > able to manipulate > actual objects in python code (Graham's part). > > Other than that kudos to both of the gentlemen. > > Maciej > > > On Thu, Oct 6, 2016 at 9:59 PM, Graham Dumpleton <[email protected]> > wrote: > > > > > > > ----- Original Message ----- > > > From: "Charlie Drage" <[email protected]> > > > To: [email protected] > > > Sent: Friday, October 7, 2016 12:18:22 AM > > > Subject: Possible integration of a new Python library (kubeshift) to > > the Github repo > > > > > > Hey all, > > > > > > I've developed and maintained a Python library for both Kubernetes and > > > OpenShift. > > > > > > The link is here: > > > > > > https://github.com/cdrage/kubeshift > > > > > > The contributors and I have been quite busy integrating new features as > > well > > > as having 100% test coverage in regards to each contribution. Not only > > that, > > > but we continue to create documentation as well as a website for the > > > library: https://cdrage.github.io/kubeshift > > > > > > The library communicates 100% through the HTTP API as well as generates > > > appropriate configurations for communication between the two (using the > > > Requests python library + proper ssl certs, etc.). Another feature is the > > > integration of automatically retrieving API credentials (via a login > > > function) in order to ease setup of communication between the two. More > > > information can be found on the github repo! > > > > > > I noticed that OpenShift has https://github.com/openshift/ > > python-interface > > > seems to no longer be used / developed on. After Google'ing as well as > > > searching through GitHub I could not find any other efforts on creating a > > > Python library for OpenShift. > > > > My own efforts in the space can be found at: > > > > https://github.com/GrahamDumpleton/openshift3-python-library > > > > At this point I had been developing this for my own personal use as when I > > had mentioned I was working on it on some of the lists the sentiment had > > been that a purpose built Python client library wasn't required as you > > could just generate one from the Swagger API. Unfortunately the Swagger API > > definition had various problems with it and the existing tools for > > generating a client from the Swagger API for Python didn't yield that great > > of a result. > > > > The intent of the library I wrote was to cover a number of different use > > cases. > > > > 1. Reading and manipulating JSON definitions for resource objects > > independent of any interaction with the REST API. This provided actual > > Python classes for resource object types based on the schema rather than > > fiddling with raw dictionaries. > > 2. Making calls against the REST API, using (1) to be able to create > > definitions to be passed, or manipulate results so that they could then be > > passed in a subsequent call. > > 3. Provide help in creating complicated deployments involving multiple > > applications such as databases, front ends etc, with linking via > > environment variables etc. This was relying on a template system using > > Jinja2 to generate the starter JSON definitions which would then be > > consumed by (1) with additional Python helper functions to then do link > > etc. > > > > Items (1) and (2) are done with (3) being in progress. > > > > I already own the 'openshift3' name in Python package index (PyPi). > > > > Graham > > > > > Considering the "Kubeshift" is an extension of the efforts at > > > https://github.com/openshift/python-interface by implementing a Python > > > library via the "requests" library. Would the OpenShift org consider > > merging > > > efforts and having "kubeshift" integrated into the OpenShift repo as a > > > first-class Python library for OpenShift / Kubernetes? > > > > > > Of course, I will continue development of said library, but the more > > eyes on > > > it (via the openshift repo) the more feedback we get as well as usage of > > > OpenShift :) > > > > > > Many thanks! > > > > > > Charlie Drage > > > PGP - 4096R/C037D617 > > > http://pgp.mit.edu/pks/lookup?op=get&search=0xDA227403C037D617 > > > > > > _______________________________________________ > > > dev mailing list > > > [email protected] > > > http://lists.openshift.redhat.com/openshiftmm/listinfo/dev > > > > > > > _______________________________________________ > > dev mailing list > > [email protected] > > http://lists.openshift.redhat.com/openshiftmm/listinfo/dev > > > _______________________________________________ dev mailing list [email protected] http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
