semvec/pypi-packages huggingface dataset:
vements 0.0.5
Achievements and Scoreboards for Everyone
Requires Python: >=3.7

[![Build and Test](https://github.com/vements/client-py/actions/workflows/build-test.yaml/badge.svg?event=push)](https://github.com/vements/client-py/actions/workflows/build-test.yaml) [![GitHub tag](https://img.shields.io/github/tag/vements/client-py?include_prereleases=&sort=semver&color=blue)](https://github.com/vements/client-py/releases/)
[![License](https://img.shields.io/badge/License-MIT-blue)](#license)
[![issues - client-py](https://img.shields.io/github/issues/vements/client-py)](https://github.com/vements/client-py/issues)

## Vements Client Library for Python

The Vements Client Library for Python is a Python library for accessing the Vements API.  It also includes a command line tool that can be used to interact with the API in scripts or in a terminal.


### Documentation

See the [Getting Started Guide](https://vements.io/docs/guides/getting-started/) for more information on how to use this library.

### Installation

To install the Vements Client Library for Python, use the following command:

```bash
$ pip install vements
```

### Build 

There is no separate build step for the Python CLI tool, but you can simplify access with an alias:

```bash
$ alias vements='python -m vements'
```

### Usage 

The following example shows how to use the Vements Client Library for Python to create a new Vements client, and then use that client to create a new Vements scoreboard.

```python
import vements

client = vements.Client()
scoreboard = client.scoreboard.create(display="My Scoreboard", rank_dir="desc", public=False)
```

### Command Line Tool

The Python CLI tool supports all of the same operations as the CLI tool in other languages:

* achievement CRUD, list, leaderboard, record progress
* participant CRUD, list, progress, scores
* scoreboard CRUD, list, scoreboard, record score

The above commands all support the following options:

* `--api-key` to specify the API key
* `--verbose` to show verbose output

In addition to resource commands, these common commands are also supported:

* `api-version` to show the API version
* `client-version` to show the client library version

The library and CLI both support the following environment variables:

* `API_KEY` to specify the API key
* `SERVER_TAGS` to specify the tags used to select the server URL
cirun 0.30
Cirun Python Client
Requires Python: >=3.7

# 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.