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.13.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distributions

gocd-0.13.0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

gocd-0.13.0-py2-none-any.whl (19.6 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for gocd-0.13.0.tar.gz
Algorithm Hash digest
SHA256 36a5d3f85436fe6f7c2ce3e56e8b4f3e03340b7593d3b6cae6bb5c739f023f85
MD5 ee65905eb55db307e240bde6d810c80f
BLAKE2b-256 0947592feae7fe533fc10da6bdcdc6fda0b52c4f8e25dabd1d503fcb90d17a9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gocd-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c4c8d57c41bfb3087d8a374bcbb98017576800946e83d44e237a4befcbabb85
MD5 c0c7e1daa913f86aa0dff9271c843c42
BLAKE2b-256 e21cb2be7cce684a8ebb37d61abb8eec053f4e71b6278328aa0ecfe10d180ac1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gocd-0.13.0-py2-none-any.whl
Algorithm Hash digest
SHA256 a1f76d2034c797fe546ce82ce60d091bd06f71627c811e5d5c7b87261333b9ea
MD5 f1621ec48003ee17b763a9c1377ee821
BLAKE2b-256 a97bd93594c56210de1d9cd61554f159693d5078a25d15a73dd00b49d9a8a948

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