Cirun Python Client and CLI
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.30
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cirun-0.30.tar.gz | 10.2 kB | Without provenance | Details for cirun-0.30.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cirun-0.30-py3-none-any.whl | Python 3 | none | any | Details for cirun-0.30-py3-none-any.whl |
Total release size: 20.5 kB
Release files / cirun-0.30.tar.gz
| Download URL | cirun-0.30.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb4401968fe1fad050ffc5d361c436debe483a6e3ddcd7f6e8066dcd3e750ec1
|
|
BLAKE2b-256 checksum How to use checksums |
17a51e53446073254644ddda48b9892dd9d9f39533567d362760477f784caffd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.25.2
|
Release files / cirun-0.30-py3-none-any.whl
| Download URL | cirun-0.30-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
707212233a25a3a9695be452c2c32bb6fea4beaff1c8eed61034180b9284569b
|
|
BLAKE2b-256 checksum How to use checksums |
e40804d78cdb7ca8c3844b00382c05bb983613b4213b1cbb3ff3ea8fe15cf741
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.25.2
|
Security for cirun 0.30
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.