pycircleci
Asynchronous Python client for CircleCI API.
Ported from pycircleci, a fork of the discontinued circleci.py project.
Features
Installation
$ pip install pycircleci-async
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
import asyncio
from pycircleci_async import CircleCIClient
async def main():
async with CircleCIClient(token='<access-token-uuid>') as circle_client:
await circle_client.get_user_info()
results = await circle_client.get_projects()
asyncio.run(main())
Contributing
- Fork it
- Install poetry (
pip install poetry
) - Install dependencies (
poetry install
) - Create your feature branch (
git checkout -b my-new-feature
) - Make sure
flake8
and the pytest
test 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