Cirun Python Client
Project description
Cirun Python Client and CLI
Table of Contents
Installation
pip install 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
}
──────────────────────────────────────────────────────────────────────────────────────────────────────────
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cirun-0.1.tar.gz
(5.5 kB
view details)
Built Distribution
cirun-0.1-py3-none-any.whl
(5.5 kB
view details)
File details
Details for the file cirun-0.1.tar.gz
.
File metadata
- Download URL: cirun-0.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d6441afcd54e8eca2422de5ac59b0ff08c340f67fee486057377947e328f32e7
|
|
MD5 |
6e6b34f196204b6c0d8f9817e9711fec
|
|
BLAKE2b-256 |
2c8f1d2a3566eb011c54ab497834f431e2ccbb0013e2b078e82c3c85aa1d1cf6
|
File details
Details for the file cirun-0.1-py3-none-any.whl
.
File metadata
- Download URL: cirun-0.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
6f9865cdadcf934d651957349433a71d63f3a7fe59653764b830febdbd032ca4
|
|
MD5 |
fa29acbdf71346cb08a937dac0b2fc02
|
|
BLAKE2b-256 |
366dcdb0164e7800e42e497fa00466a3c31038090d3ebfd7bce969bb321f5629
|