Package: circleclient
Python client library for CircleCI API.FeaturesRetrieve information about userList followed repositoriesReturn status of recent builds for given projectStart buildCreate parametrized buildsList build artifactsCancel buildRetry buildClear build cacheInstallationpipinstallcircleclientUsageRetrieve information about Userimportosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# Retrieve User dataclient.user.info()List projects followed by the userimportosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# Retrieve information about projectsclient.projects.list_projects()Trigger new buildimportosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# Trigger buildclient.build.trigger('<username>','<project_name>','<branch>')Trigger new parametrized buildimportosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# Trigger parametrized buildclient.build.trigger('<username>','<project_name>','<branch>','<PARAM1>'='<VAL1>')Cancel running buildimportosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# Cancel buildclient.build.cancel('<username>','<project_name>','<build_number>')Retry buildimportosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# Retry buildclient.build.retry('<username>','<project_name>','<build_number>')List build artifactsimportosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# List build artifactsclient.build.artifacts('<username>','<project_name>','<build_number>')Retrieve build statusimportosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# Retrieve build statusclient.build.status('<username>','<project_name>','<build_number>')Retrieve information about builds across all projectsimportosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# Retrieve build status# Default limit=30, offset=0client.build.recent_all_projects(limit=<int>,offset=0)client.build.recent_all_projects()Retrieve information about recent build(s)importosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# Retrieve build status# Default limit=30, offset=0, branch=Noneclient.build.recent('<username>','<project>',limit='<int>',offset='<int>')# Retrieve last 10 builds of branch masterclient.build.recent('<username>','<project>',limit=10,branch='master')# Retrieve last build of branch developclient.build.recent('<username>','<project>',branch='develop')Retrieve filtered information about recent build(s)importosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(token)# Retrieve build status and filter resultsclient.build.recent('<username>','<project>',branch='master',status_filter='completed')client.build.recent('<username>','<project>',branch='develop',status_filter='successful')client.build.recent('<username>','<project>',limit=10,status_filter='failed')client.build.recent('<username>','<project>',status_filter='running')Clear build cacheimportosfromcircleclientimportcircleclienttoken=os.environ['API_TOKEN']client=circleclient.CircleClient(api_token=token)# Clear build cacheclient.cache.clear(username='<username>',project='<project_name>')DocumentationThe full documentation is athttp://circleclient.rtfd.org.History0.1.6 (2015-09-04)Updated documentation0.1.5 (2015-31-03)Filter recent builds by build status: completed, successful, failed, running0.1.4 (2014-21-09)Retrieving information about single and multiple builds.Retrieving a limited number of builds with optional offset.Retrieving build information about specific branch.0.1.3 (2014-25-07)Add support for parametrized buildsAdd support for listing build artifacts0.1.2 (2014-07-07)Add support for clearing cache0.1.1 (2014-30-06)Add support for retrying builds0.1.0 (2014-29-06)First release on PyPI.