Install and sign in#
Install#
pip install https://runcompute.cloud/sdk/runcompute-0.2.0-py3-none-any.whl
runcompute --version
The package has no dependencies outside the Python standard library.
Create an API key#
Open the console, enter your email address and select
Create key. Keys start with rc_. The console shows the key once on the
API keys page; copy it somewhere safe.
Sign in from a terminal#
runcompute login
Paste the key when asked. The command checks it against the API and saves it
to ~/.runcompute/credentials.json with permissions 600.
For scripts, pass it directly:
runcompute login --key "$RUNCOMPUTE_API_KEY"
Use a key without saving it#
The client reads keys in this order:
| Source | Example |
|---|---|
api_key argument |
runcompute.Client(api_key="rc_...") |
RUNCOMPUTE_API_KEY environment variable |
export RUNCOMPUTE_API_KEY=rc_... |
| Saved login | ~/.runcompute/credentials.json |
Set RUNCOMPUTE_HOME to keep credentials somewhere other than ~/.runcompute.
Other deployments#
The client talks to https://runcompute.cloud by default. Point it elsewhere
with base_url=, RUNCOMPUTE_BASE_URL, or runcompute --base-url. A login
made with --base-url remembers that address.
Sign out#
runcompute logout