circleclient package

Submodules

circleclient.circleclient module

class circleclient.circleclient.Build(client)[source]

Bases: object

artifacts(username, project, build_num)[source]

Return artifacts produced by given build.

Return information about artifacts as a list of dictionaries.

cancel(username, project, build_num)[source]

Cancel the build and return its summary.

recent(username, project, limit=1, offset=0, branch=None, status_filter='')[source]

Return status of recent builds for given project.

Retrieves build statuses for given project and branch. If branch is None it retrieves most recent build.

Args:

username (str): Name of the user. project (str): Name of the project. limit (int): Number of builds to return, default=1, max=100. offset (int): Returns builds starting from given offset. branch (str): Optional branch name as string. If specified only

builds from given branch are returned.
status_filter (str): Restricts which builds are returned. Set to
“completed”, “successful”, “failed”, “running”, or defaults to no filter.
Returns:
A list of dictionaries with information about each build.
recent_all_projects(limit=30, offset=0)[source]

Return information about recent builds across all projects.

Args:
limit (int), Number of builds to return, max=100, defaults=30. offset (int): Builds returned from this point, default=0.
Returns:
A list of dictionaries.
retry(username, project, build_num)[source]

Retry the build and return a summary of the new build.

status(username, project, build_num)[source]

Return summary of given build number.

trigger(username, project, branch, **build_params)[source]

Trigger new build and return a summary of the build.

class circleclient.circleclient.Cache(client)[source]

Bases: object

clear(username, project)[source]

Clear the cache for given project.

class circleclient.circleclient.CircleClient(api_token=None, endpoint=None)[source]

Bases: object

Represents CircleCI client.

Attributes:
api_token: CircleCI API token for the client.
client_delete(url, **kwargs)[source]

Send POST request with given url.

client_get(url, **kwargs)[source]

Send GET request with given url.

client_post(url, **kwargs)[source]

Send POST request with given url and keyword args.

make_headers()[source]
make_url(path)[source]
request(method, url, **kwargs)[source]
class circleclient.circleclient.Projects(client)[source]

Bases: object

Represent a project in CircleCI.

Attributes:
client: An instance of CircleClient object.
list_projects()[source]

Return a list of all followed projects.

class circleclient.circleclient.User(client)[source]

Bases: object

Represent a CircleCI authenticated user.

Attributes:
client: An instance of CircleClient object.
info()[source]

Return information about the user as a dictionary.

Module contents