1. 🚀 The foundations
1.1 Sign up for a Tenyks account
The very first step is to create a Tenyks dashboard account at https://dashboard.tenyks.ai.
1.2 Obtain your API keys
After signing up, the next step is to retrieve your API keys.
- 👉 Learn more about how these keys work (e.g., expiration time) here.
On the top right side of your dashboard account, click on the thumbnail image. Then, click on Generate new API credentials, as shown below.
1.3 Tenyks SDK installation
!pip install tenyks_sdk
Note: After running pip install tenyks_sdk
, you may need to restart the runtime 🔄 if you encounter the following warning message ⚠️:
You must restart the runtime in order to use newly installed versions.
To restart the runtime:
- Go to the menu at the top of the page
- Select Runtime
- Click on Restart session
Next, we need to install pandas
and matplotlib
!pip install pandas matplotlib -q
1.4 Authenticate your account
from tenyks_sdk.sdk import Tenyks, Annotation, Category, Tag, display_images
from tenyks_sdk.sdk.cloud import AWSLocation, AWSCredentials, AzureLocation, AzureCredentials, AzureTokenType, GCSLocation
import pandas as pd
import matplotlib.pyplot as plt
import time
from datetime import timedelta
We'll use the API keys you retrieved in step 1.2
- 🔑 Important: When setting up your workspace, use your
api_key
as the value forworkspace_name
. This ensures proper authentication and access to your specific workspace.
auth_params = {
"api_base_url": "<https://dashboard.tenyks.ai/api">,
"api_key": "2a89-45ef-86f2-abf7633332b1",
"api_secret": "4e06-4180-ac76-b10402ee4ece",
"workspace_name": "2a89-45ef-86f2-abf7633332b1",
}
tenyks = Tenyks.authenticate_with_api_key(\*\*auth_params)
Troubleshooting:
- Check first that you copied/pasted the correct API keys
- Authenticate with your login credentials (i.e., username/password) instead
1.5 Setting up your Workspace
📓 A Workspace helps you manage your datasets and models.
Each workspace can define its own set of users. 🦸 🦹
- By default you're assigned a workspace named "My Workspace"
Once you have successfully authenticated, you can retrieve the workspaces you have access to, as well as features like creating new workspaces! 🚀
The following function retrieves your workspaces
tenyks.get_workspaces()
Let's create a new workspace for our videos
new_workspace = tenyks.create_workspace("gabriel_data_workspace")
Finally, we set this newly created workspace as our current workspace
- 💡 Note that from the output of
tenyks.get_workspaces()
, we take thekey
of the newly created workspace.
workspace_key = "gabriel_data_workspace_976264f4"
tenyks.set_workspace(workspace_key)
Updated about 2 months ago