Flexible and Easy-to-use Developer Tools
For rapid integration of your data pipeline, TensorBay provides various developer tools including Python SDK, CLI, and API with specific documentations and use cases
Start for Free
version banner
Upload Data in Standardized Methods
Easily use and manage your cloud data by uploading and reading data via Python SDK or Open API
Manage and Use Different Data with Flexibility
Integrate with your data pipeline by uploading, reading, and managing multi-sensor data, time-series continuous data, and annotations via Python SDK or Open API
Comprehensive Use Cases and Documentations
Our comprehensive documentations include installation guides, interface tutorials, sample codes, etc., providing users with an effortless experience
background
Python SDK Example
Use TensorBay via Graviti Python SDK
View the Documents

Install PythonSDK

pip3 install tensorbay

Read images from the dataset

# !/usr/bin/env python3

from PIL import Image
from tensorbay import GAS
from tensorbay.dataset import Segment

gas = GAS("<YOUR_ACCESSKEY>")

dataset = Dataset("<DATASET_NAME>", gas)

segment = dataset["<SEGMENT_NAME>"]
for data in segment:
    with data.open() as fp:
        image = Image.open(fp)
        width, height = image.size
        image.show()

background background
CLI Example
Use TensorBay in your development environment via Graviti CLI
View the Documents

Configuration

gas auth [YOUR_ACCESSKEY]                                 # Use the AccessKey for the current environment.

Usage

gas dataset                                                 # List the names of all the datasets.

gas dataset tb:<dataset_name>                               # Create a new dataset.

gas ls tb:<dataset_name>                                    # List the names of all the segments of the dataset.

gas ls -a tb:<dataset_name>                                 # List all the files in all the segments of the dataset.

gas ls tb:<dataset_name>:<segment_name>                     # List all the files in a specific segment of the dataset.

gas dataset -d tb:<dataset_name>                            # Delete the dataset.
background
Open API Examples
Use TensorBay in your development environment via Graviti Open API
View the Documents

Example of Creating a New Dataset

Create a dataset with version control. The dataset name must be unique.

Request Path

POST /v1/datasets

Request Parameters

Body

Name Type Required? Description
name string Yes Dataset name
type int No The default is 0, 0-normal dataset, 1-Fusion dataset

Request Instance

curl --location --request POST '{service}/v1/datasets' \
--header 'x-token: {your_accesskey}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "my first dataset",
  "type": 0
}'

Output

# Response status
HttpStatus 201
# Response result
{
    "id": "154e35ba-e895-4f09-969e-f8c9445efd2c"
}
  • id: ID of the created dataset
Start Building AI Now