cirun


Namecirun JSON
Version 0.30 PyPI version JSON
download
home_pageNone
SummaryCirun Python Client
upload_time2023-11-26 18:31:17
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements rich typer hatch requests pytest sphinx sphinx_rtd_theme ghp-import pytest furo
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Cirun Python Client and CLI

[![PyPI - Version](https://img.shields.io/pypi/v/cirun.svg)](https://pypi.org/project/cirun)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cirun.svg)](https://pypi.org/project/cirun)

-----

**Table of Contents**

- [Installation](#installation)
- [Usage](#license)
- [License](#license)

## Installation

```console
pip install cirun
```

or via `conda-forge`

```console
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`

```console
export CIRUN_API_KEY=<your-api-key>
```

### CLI

- List active repositories for Cirun

```bash
$ 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

```bash
$ cirun repo add aktech/sympy
──────────────────────────────────────────────────────────────────────────────────────────────────────────
{
  "name": "aktech/sympy",
  "active": true
}
──────────────────────────────────────────────────────────────────────────────────────────────────────────
```

- Deactivate (remove) a repository

```bash
$ cirun repo remove aktech/sympy
──────────────────────────────────────────────────────────────────────────────────────────────────────────
{
  "name": "aktech/sympy",
  "active": false
}
──────────────────────────────────────────────────────────────────────────────────────────────────────────
```

- Connect cloud provider with Cirun

```bash
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

```python
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](https://spdx.org/licenses/MIT.html) license.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cirun",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Amit Kumar <amit@cirun.io>",
    "download_url": "https://files.pythonhosted.org/packages/17/a5/1e53446073254644ddda48b9892dd9d9f39533567d362760477f784caffd/cirun-0.30.tar.gz",
    "platform": null,
    "description": "# Cirun Python Client and CLI\n\n[![PyPI - Version](https://img.shields.io/pypi/v/cirun.svg)](https://pypi.org/project/cirun)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cirun.svg)](https://pypi.org/project/cirun)\n\n-----\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [Usage](#license)\n- [License](#license)\n\n## Installation\n\n```console\npip install cirun\n```\n\nor via `conda-forge`\n\n```console\nconda install -c conda-forge cirun\n```\n\n## Usage\n\n**cirun-py** can be used as a CLI as well as a Python client programmatically.\n\n- Create an API key from the Cirun Dashboard https://cirun.io/admin/api\n- Set that API Key as an environment variable named `CIRUN_API_KEY`\n\n```console\nexport CIRUN_API_KEY=<your-api-key>\n```\n\n### CLI\n\n- List active repositories for Cirun\n\n```bash\n$ cirun repo list\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n{\n  \"repos\": [\n    {\n      \"repository\": \"aktech/cirun-openstack-example\",\n      \"active\": true,\n      \"private\": false\n    },\n    {\n      \"repository\": \"aktechlabs/cirun-demo\",\n      \"active\": true,\n      \"private\": true\n    }\n  ]\n}\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n```\n\n- Active (add) a repository\n\n```bash\n$ cirun repo add aktech/sympy\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n{\n  \"name\": \"aktech/sympy\",\n  \"active\": true\n}\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n```\n\n- Deactivate (remove) a repository\n\n```bash\n$ cirun repo remove aktech/sympy\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n{\n  \"name\": \"aktech/sympy\",\n  \"active\": false\n}\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n```\n\n- Connect cloud provider with Cirun\n\n```bash\ncirun cloud connect aws --access-key AKIXXXXXXXXX --secret-key KFCF3yi+df0n12345678AMASDFGHJ\n\ncirun cloud connect azure \\\n  --subscription-id 31184337-0346-4782-ae59-eb185fd0cfa1 \\\n  --tenant-id a66e466d-698b-4a91-b9e3-949f9cc04f11 \\\n  --client-id 340d01fc-ba24-43ee-844e-d364899d29e7 \\\n  --client-secret KFCF3yi+df0cirunIsAwesomeIsntIt?n1DFGHJ\n\ncirun cloud connect gcp --key-file /path/to/service-account-key.json\n```\n\n### Client\n\n```python\nfrom cirun import Cirun\n# Create cirun client object\n# Pass the token or set `CIRUN_API_KEY` environment variable\nc = Cirun(token='cirun-4cabcdbf-275c-4500-890d-712340663ddc')\n\n# List repositories\nc.get_repos()\n\n# Active (add) a repository\nc.set_repo('aktech/sympy', active=True)\n\n# Deactivate (remove) a repository\nc.set_repo('aktech/sympy', active=False)\n```\n\n## License\n\n`cirun` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Cirun Python Client",
    "version": "0.30",
    "project_urls": {
        "Documentation": "https://github.com/aktechlabs/cirun-py#readme",
        "Issues": "https://github.com/aktechlabs/cirun-py/issues",
        "Source": "https://github.com/aktechlabs/cirun-py"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e40804d78cdb7ca8c3844b00382c05bb983613b4213b1cbb3ff3ea8fe15cf741",
                "md5": "47a6f44ccbd0b95ee9a60a544700f766",
                "sha256": "707212233a25a3a9695be452c2c32bb6fea4beaff1c8eed61034180b9284569b"
            },
            "downloads": -1,
            "filename": "cirun-0.30-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "47a6f44ccbd0b95ee9a60a544700f766",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10275,
            "upload_time": "2023-11-26T18:31:16",
            "upload_time_iso_8601": "2023-11-26T18:31:16.163199Z",
            "url": "https://files.pythonhosted.org/packages/e4/08/04d78cdb7ca8c3844b00382c05bb983613b4213b1cbb3ff3ea8fe15cf741/cirun-0.30-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "17a51e53446073254644ddda48b9892dd9d9f39533567d362760477f784caffd",
                "md5": "b5b7e2cfbef4d8a4ac30068914710b31",
                "sha256": "bb4401968fe1fad050ffc5d361c436debe483a6e3ddcd7f6e8066dcd3e750ec1"
            },
            "downloads": -1,
            "filename": "cirun-0.30.tar.gz",
            "has_sig": false,
            "md5_digest": "b5b7e2cfbef4d8a4ac30068914710b31",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 10198,
            "upload_time": "2023-11-26T18:31:17",
            "upload_time_iso_8601": "2023-11-26T18:31:17.608298Z",
            "url": "https://files.pythonhosted.org/packages/17/a5/1e53446073254644ddda48b9892dd9d9f39533567d362760477f784caffd/cirun-0.30.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-26 18:31:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aktechlabs",
    "github_project": "cirun-py#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "rich",
            "specs": []
        },
        {
            "name": "typer",
            "specs": []
        },
        {
            "name": "hatch",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "sphinx",
            "specs": []
        },
        {
            "name": "sphinx_rtd_theme",
            "specs": []
        },
        {
            "name": "ghp-import",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "furo",
            "specs": []
        }
    ],
    "lcname": "cirun"
}
        
Elapsed time: 0.31852s