Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pycircleci

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pycircleci

Python client for CircleCI API

  • 0.7.0
  • PyPI
  • Socket score

Maintainers
1

pycircleci

PyPI version Build Status

Python client for CircleCI API.

Based on the discontinued circleci.py project.

Features

  • Supports API v1.1 and API v2
  • Supports both circleci.com and 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

  1. Fork it
  2. Install dev dependencies (pip install -r requirements-dev.txt)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Make sure flake8 and the pytest test suite successfully run locally
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create new Pull Request

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc