Skip to main content
# python-klabclient

## Installation

Developer installation:

```bash
git clone https://github.com/kuberlab/python-klabclient
cd python-klabclient
pip install -e .
```
* for MacOS add --ignore-installed six at the end of the command line

User installation:

```bash
pip install python-klabclient
```
* for MacOS add --ignore-installed six at the end of the command line


Install in virtual environment:


```bash
virtualenv venv
cd venv
bin/pip install python-klabclient
```

* `klab` console command will be accessed from `venv/bin/klab` path.


## Uninstall:

```bash
pip uninstall python-klabclient
```

* Also, if it is required, delete file `~/.kuberlab/config`.

## Usage

#### Use config for auth (default location is *~/.kuberlab/config*)

```bash
touch ~/.kuberlab/config
cat << EOF >> ~/.kuberlab/config
base_url: https://go.kuberlab.com/api/v0.2
token: <user-token>
EOF
```

**Note**: Refer to [Config example](config.yaml.example) to see all possible values.

#### Use environment variables

```bash
# Set token
export KUBERLAB_TOKEN=token
# Or, use your login/password
export KUBERLAB_USERNAME=my@example.com
export KUBERLAB_PASSWORD=mypassword
```

#### Call CLI or see help to take a look on a command list:

```bash
klab workspace-list

# See help
klab --help
```

## App installation example

See how to install a simple app - [App installation](App_installation.md)

**Note**: Priority for auth parameters: CLI parameters, Env variables, config values.

## Usage as a python library

```python
from klabclient.api import client

# Init session
ses = client.create_session(token='token') # Pick up default base_url
# Or, use username and password
# ses = client.create_session(username='username', password='password') # Pick up default base_url

klab = client.Client(session=ses) # Pick up default klab_url

workspaces = klab.workspaces.list()
# Print all workspace names
print([w.Name for w in workspaces])
```



Metadata

Release files for python-klabclient 1.0.4

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

Built distribution (wheel)

Table of built distributions (wheels) for python-klabclient 1.0.4
File Interpreter ABI Platform
python_klabclient-1.0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / python_klabclient-1.0.4-py2.py3-none-any.whl

Download URL python_klabclient-1.0.4-py2.py3-none-any.whl
Size 47.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6a29ce3b196adedf0b1bb3c5f6aa9fce3e0bd01719872d4dfa3b687d158a2f49
BLAKE2b-256 checksum
How to use checksums
9e41806b44083b9021585f407a33509d8140d13b6fe26268bbb06f64c8debde6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for python-klabclient 1.0.4

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.

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