Skip to main content

Save data from CircleCI to a SQLite database

Project description

circleci-to-sqlite

PyPI Changelog Tests License

Save data from CircleCI to a SQLite database.

How to install

$ pip install circleci-to-sqlite

Authentication

Create a CircleCI personal access token: https://app.circleci.com/settings/user/tokens

Run this command and paste in your new token:

$ circleci-to-sqlite auth

This will create a file called auth.json in your current directory containing the required value. To save the file at a different path or filename, use the --auth=myauth.json option.

As an alternative to using an auth.json file you can add your access token to an environment variable called CIRCLECI_TOKEN.

Fetching projects for the current user

The projects command retrieves all of the projects for the current user.

$ circleci-to-sqlite projects circleci.db

Fetching jobs for a project

The jobs command retrieves all of the jobs belonging to a project. A project is specified by its slug, which has the form {vcs_type}/{username}/{reponame}.

$ circleci-to-sqlite jobs circleci.db github/seem/circleci-to-sqlite

Fetching steps for a job

The steps command retrieves all of the steps and their actions belonging to a job.

$ circleci-to-sqlite steps circleci.db github/seem/circleci-to-sqlite 8

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd circleci-to-sqlite
python -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and tests:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circleci-to-sqlite-0.3.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

circleci_to_sqlite-0.3.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file circleci-to-sqlite-0.3.0.tar.gz.

File metadata

  • Download URL: circleci-to-sqlite-0.3.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for circleci-to-sqlite-0.3.0.tar.gz
Algorithm Hash digest
SHA256 36bd5b5246452588f7eba548aa1e7b76ed094c61e4381bbb7c0b36e8d50bbf19
MD5 94df51ff9db49b5733564f3a1a60b6e0
BLAKE2b-256 21202b7323a3bc4aa8124da16f5fa4778deed3eff2852971f6f77aa29ac100b4

See more details on using hashes here.

File details

Details for the file circleci_to_sqlite-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: circleci_to_sqlite-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for circleci_to_sqlite-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46ec12e59a2104ae407d273dd163470f69e5618f35bf50af7c03829b7292b115
MD5 4a3087ccaa750f1021769c62db93cc6e
BLAKE2b-256 2ed3475585bbdad46cd877b48a4b86784990104d81315d748f2be24e2f0a7af8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page