Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Cloud API Scripts

This section contains scripts for interacting with the TypeDB Cloud API, specifically for deploying a new TypeDB cluster.

The examples are presented in three languages - bash, python, and node.js

All examples required a Cloud API token, which can be acquired from the team settings page.

The bash script is located at cloud-api-scripts/bash/deploy.sh.

Example usage:

export TYPEDB_CLOUD_CLIENT_ID=...
export TYPEDB_CLOUD_CLIENT_SECRET=...

./deploy.sh my-team my-space gcp europe-west2 api-cluster

The python script is located at cloud-api-scripts/python/main.py.

It was built using uv, but should run in any python environment.

Example usage:

With uv:

export TYPEDB_CLOUD_CLIENT_ID=...
export TYPEDB_CLOUD_CLIENT_SECRET=...

uv run my-team my-space gcp europe-west2 api-cluster

Without uv

export TYPEDB_CLOUD_CLIENT_ID=...
export TYPEDB_CLOUD_CLIENT_SECRET=...

python -m venv .venv
source .venv/bin/activate
python -m pip install . 
python main.py my-team my-space gcp europe-west2 api-cluster

The node.js script is located at cloud-api-scripts/bash/deploy.js.

Example usage:

export TYPEDB_CLOUD_CLIENT_ID=...
export TYPEDB_CLOUD_CLIENT_SECRET=...

node deploy.js my-team my-space gcp europe-west2 api-cluster