Python client for CircleCI API
Project description
pycircleci
Python client for CircleCI API.
Based on the discontinued circleci.py project.
Features
- Supports API v1.1 and API v2
- Supports both
circleci.comand self-hosted Enterprise CircleCI
Installation
$ pip install pycircleci
Usage
Create a personal API token.
Set up the expected env vars:
CIRCLE_TOKEN # CircleCI API access token
CIRCLE_API_URL # CircleCI API base url. Defaults to https://circleci.com/api
from pycircleci.api import Api, CIRCLE_TOKEN, CIRCLE_API_URL
circle_client = Api(token=CIRCLE_TOKEN, url=CIRCLE_API_URL)
# get current user info
circle_client.get_user_info()
# get list of projects
results = circle_client.get_projects()
# pretty print results as json
circle_client.ppj(results)
# pretty print the details of the last request/response
circle_client.ppr()
Interactive development console
make console
This starts a pre-configured python interactive console which gives you access to a
client object - an instance of the Api class to play around. From the console
type man() to see the help screen.
Contributing
- Fork it
- Install dev dependencies (
pip install -r requirements-dev.txt) - Create your feature branch (
git checkout -b my-new-feature) - Make sure
flake8and thepytesttest suite successfully run locally - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycircleci-0.7.0.tar.gz.
File metadata
- Download URL: pycircleci-0.7.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4153069b2e607693997e4ffe7a0a806e489ffe14e4cff67c1a7e954f0b3b397b
|
|
| MD5 |
1c03a63d31d2e0e3cd8f614bdaa910b9
|
|
| BLAKE2b-256 |
3e67a4130f7122b1a82b31bda2edacbfdf47d7e4417d6d6f96e7e772d9b54af9
|
File details
Details for the file pycircleci-0.7.0-py3-none-any.whl.
File metadata
- Download URL: pycircleci-0.7.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2835174324e95346829e5824072e4cf2d81460c2a370a422718d95b99a7bdc1
|
|
| MD5 |
4a21d7ea77b5ed94126f9f889fdb2e7f
|
|
| BLAKE2b-256 |
24ea5dd6df1443c594ca2677c18812bc9f7993905705559231337e4391d307f1
|