circleclient
Python client library for CircleCI API.
Features
Retrieve information about user
List followed repositories
Return status of recent builds for given project
Start build
Create parametrized builds
List build artifacts
Cancel build
Retry build
Clear build cache
Installation
pip install circleclient
Usage
Retrieve information about User
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# Retrieve User data
client.user.info()
List projects followed by the user
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# Retrieve information about projects
client.projects.list_projects()
Trigger new build
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# Trigger build
client.build.trigger('<username>', '<project_name>', '<branch>')
Trigger new parametrized build
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# Trigger parametrized build
client.build.trigger('<username>', '<project_name>', '<branch>', '<PARAM1>'='<VAL1>')
Cancel running build
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# Cancel build
client.build.cancel('<username>', '<project_name>', '<build_number>')
Retry build
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# Retry build
client.build.retry('<username>', '<project_name>', '<build_number>')
List build artifacts
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# List build artifacts
client.build.artifacts('<username>', '<project_name>', '<build_number>')
Retrieve build status
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# Retrieve build status
client.build.status('<username>', '<project_name>', '<build_number>')
Retrieve information about builds across all projects
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# Retrieve build status
# Default limit=30, offset=0
client.build.recent_all_projects(limit=<int>, offset=0)
client.build.recent_all_projects()
Retrieve information about recent build(s)
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# Retrieve build status
# Default limit=30, offset=0, branch=None
client.build.recent('<username>', '<project>', limit='<int>', offset='<int>')
# Retrieve last 10 builds of branch master
client.build.recent('<username>', '<project>', limit=10, branch='master')
# Retrieve last build of branch develop
client.build.recent('<username>', '<project>', branch='develop')
Retrieve filtered information about recent build(s)
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(token)
# Retrieve build status and filter results
client.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 cache
import os
from circleclient import circleclient
token = os.environ['API_TOKEN']
client = circleclient.CircleClient(api_token=token)
# Clear build cache
client.cache.clear(username='<username>', project='<project_name>')
Documentation
The full documentation is at http://circleclient.rtfd.org.
History
0.1.6 (2015-09-04)
Updated documentation
0.1.5 (2015-31-03)
Filter recent builds by build status: completed, successful, failed, running
0.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 builds
Add support for listing build artifacts
0.1.2 (2014-07-07)
Add support for clearing cache
0.1.1 (2014-30-06)
Add support for retrying builds
0.1.0 (2014-29-06)
First release on PyPI.
Metadata
Release files for circleclient 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| circleclient-0.1.6.tar.gz | 5.8 kB | Without provenance | Details for circleclient-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| circleclient-0.1.6-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for circleclient-0.1.6-py2.py3-none-any.whl |
Total release size: 12.7 kB
Release files / circleclient-0.1.6.tar.gz
| Download URL | circleclient-0.1.6.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7aadf04294b5d8e9b668e749d8781c1aecfd022b1627349fa2d9473b3f4ce0b6
|
|
BLAKE2b-256 checksum How to use checksums |
bf8fae7814ce40c7d42f1d7d7cf504e10dba2eeca4cf912cccf69b51adaf645e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / circleclient-0.1.6-py2.py3-none-any.whl
| Download URL | circleclient-0.1.6-py2.py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8e35a271a99c5a2a1ea4d011ffac1cccc81ad69bffa32e73efc018658062cd55
|
|
BLAKE2b-256 checksum How to use checksums |
f175121a9cdf005b96a555ae171de2fa27e94e03511e10aa5c8e6a1c926e32e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for circleclient 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.