Skip to main content

A Python API for interacting with Go Continuous Delivery

Project description

Coverage Status Build Status Documentation Status Latest Version Downloads Python versions Package status

The reason for this project is to provide a wrapper to easily perform operations against Go. I’ve been writing a lot of shell scripts to interact with Go using curl, but when going a little further than the most basic interactions I’ve always started to feel the need for doing all of this in a proper programming language. I.e. something that is beyond bash.

I’ve chosen to use Python and version 2.6.6 and newer as my target platform, with no external dependencies, to make it really straightforward to install/run on RHEL6 and other similar stable distributions.

This library was created to support a Go CLI, to handle some common scenarios you as an admin or advanced user would do.

API documentation available on read the docs.

Usage

The main interaction point for this library is the Server class, it contains helpers to instantiate the different API endpoints.

An example interaction:

>>> from gocd import Server
>>> server = Server('http://localhost:8153', user='ba', password='secret')
>>> pipeline = server.pipeline('Example-Pipeline')
>>> response = pipeline.history()
>>> bool(response)
True
>>> response.status_code
200
>>> response.content_type
'application/json'
>>> response.is_ok
True
>>> response.body
{"pagination":{"offset":0,"total":1,"page_size":10},"pipelines":[...]"}

Style

This project aims to follow the Google Python Style Guide and particularly the section on commenting the code.

Versioning

Semantic versioning is used.

License

MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gocd-0.15.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distributions

gocd-0.15.0-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

gocd-0.15.0-py2-none-any.whl (21.7 kB view details)

Uploaded Python 2

File details

Details for the file gocd-0.15.0.tar.gz.

File metadata

  • Download URL: gocd-0.15.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gocd-0.15.0.tar.gz
Algorithm Hash digest
SHA256 25df4a37f7eef8651c27b63bc22a91191d92e600e7d2e6725ec0962d52fa32f2
MD5 39b82dbb468420183da643163d2a1984
BLAKE2b-256 35a344f3a3adecfddf39d98ed56f090aa127ac474584d374ee3675f781422116

See more details on using hashes here.

File details

Details for the file gocd-0.15.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gocd-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75efd1dca757295f01bfdef9701f0f768f01c38f61a5347bf075ae09df792237
MD5 d26480fcc2ce65065e556791dfb116d9
BLAKE2b-256 25ce650d38226607ee973777a0037336412b924e4e1faca28183a4f75a362659

See more details on using hashes here.

File details

Details for the file gocd-0.15.0-py2-none-any.whl.

File metadata

File hashes

Hashes for gocd-0.15.0-py2-none-any.whl
Algorithm Hash digest
SHA256 8d84c635d696faab87fca079e90007b9e74e4cb543ba7dfc309487f90eebbad2
MD5 2b3919e6c7003cd7ac9970744d542160
BLAKE2b-256 54a0a1c988dda09be5a6c1dc2f62b9fe9495450ecc322272e32078c73d60cf8d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page