Skip to main content

Cirun Python Client and CLI

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install cirun

or via conda-forge

conda install -c conda-forge cirun

Usage

cirun-py can be used as a CLI as well as a Python client programmatically.

  • Create an API key from the Cirun Dashboard https://cirun.io/admin/api
  • Set that API Key as an environment variable named CIRUN_API_KEY
export CIRUN_API_KEY=<your-api-key>

CLI

  • List active repositories for Cirun
$ cirun repo list
──────────────────────────────────────────────────────────────────────────────────────────────────────────
{
  "repos": [
    {
      "repository": "aktech/cirun-openstack-example",
      "active": true,
      "private": false
    },
    {
      "repository": "aktechlabs/cirun-demo",
      "active": true,
      "private": true
    }
  ]
}
──────────────────────────────────────────────────────────────────────────────────────────────────────────
  • Active (add) a repository
$ cirun repo add aktech/sympy
──────────────────────────────────────────────────────────────────────────────────────────────────────────
{
  "name": "aktech/sympy",
  "active": true
}
──────────────────────────────────────────────────────────────────────────────────────────────────────────
  • Deactivate (remove) a repository
$ cirun repo remove aktech/sympy
──────────────────────────────────────────────────────────────────────────────────────────────────────────
{
  "name": "aktech/sympy",
  "active": false
}
──────────────────────────────────────────────────────────────────────────────────────────────────────────
  • Connect cloud provider with Cirun
cirun cloud connect aws --access-key AKIXXXXXXXXX --secret-key KFCF3yi+df0n12345678AMASDFGHJ

cirun cloud connect azure \
  --subscription-id 31184337-0346-4782-ae59-eb185fd0cfa1 \
  --tenant-id a66e466d-698b-4a91-b9e3-949f9cc04f11 \
  --client-id 340d01fc-ba24-43ee-844e-d364899d29e7 \
  --client-secret KFCF3yi+df0cirunIsAwesomeIsntIt?n1DFGHJ

cirun cloud connect gcp --key-file /path/to/service-account-key.json

Client

from cirun import Cirun
# Create cirun client object
# Pass the token or set `CIRUN_API_KEY` environment variable
c = Cirun(token='cirun-4cabcdbf-275c-4500-890d-712340663ddc')

# List repositories
c.get_repos()

# Active (add) a repository
c.set_repo('aktech/sympy', active=True)

# Deactivate (remove) a repository
c.set_repo('aktech/sympy', active=False)

License

cirun is distributed under the terms of the MIT license.

Metadata

Release files for cirun 0.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cirun 0.29
File Size Uploaded
cirun-0.29.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cirun 0.29
File Interpreter ABI Platform
cirun-0.29-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / cirun-0.29.tar.gz

Download URL cirun-0.29.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0965e8c78e6c4f8f0c44c54ff78c5c3c3a2a2ce436cbe0c2f6bc98108feb6146
BLAKE2b-256 checksum
How to use checksums
86afd6472c85607244156939f4ce305bbe64f3d64f37eea6f90edeba90f1243c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.25.2

Release files / cirun-0.29-py3-none-any.whl

Download URL cirun-0.29-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fdab835da8a75ccd88051dabebd1c0ac8dd499a5883c501c3ae86d90804b03d
BLAKE2b-256 checksum
How to use checksums
517668ece7b67239e3bc226e684318f066e47ee9afd597ad6c10a778799dd09a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.25.2

Release history Release notifications | RSS feed

0.31

2 release files

0.30

2 release files

This release

0.29 This release

2 release files

0.28

2 release files

0.27

2 release files

0.26

2 release files

0.25

2 release files

0.24

2 release files

0.23

2 release files

0.22

2 release files

0.21

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page