Skip to main content

A Python library for interacting with Go Continuous Delivery API

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-bridge-0.15.2.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

gocd_bridge-0.15.2-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file gocd-bridge-0.15.2.tar.gz.

File metadata

  • Download URL: gocd-bridge-0.15.2.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

File hashes

Hashes for gocd-bridge-0.15.2.tar.gz
Algorithm Hash digest
SHA256 2f01d9fcd70032bc42c9507325e10dcf222a1ab61988f56e2fc865b4067ba30a
MD5 20799ba90f2c684e9d86afdf58c9ed62
BLAKE2b-256 ce4b07ab07ec6c041c01f6131a67459d3b4bb6cb9a7a120029e2b21592021d63

See more details on using hashes here.

File details

Details for the file gocd_bridge-0.15.2-py3-none-any.whl.

File metadata

  • Download URL: gocd_bridge-0.15.2-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

File hashes

Hashes for gocd_bridge-0.15.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a6ca318d05b5093646393eb9e1767278b1ecd6a8fe110db4fe7b0187802d90b
MD5 3058b3248fa224e38f44ce447be6d92f
BLAKE2b-256 6de4cfe30fcdd3db7a0b23397bb280cf51bfce6fa4e0c5564c7f3fab7459263b

See more details on using hashes here.

Supported by

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