Authentication
Configure authentication for the Python SDK.
Using an Access Token
If you have an access token from the ByCloud console, you can use it directly:
from bycloud import ByCloud# Using an access tokenclient = ByCloud(token="YOUR_ACCESS_TOKEN")
Using API Key Credentials
For service accounts, use the access key ID and secret access key:
from bycloud import ByCloud# Using API key credentialsclient = ByCloud(access_key_id="YOUR_ACCESS_KEY_ID",secret_access_key="YOUR_SECRET_ACCESS_KEY")
Environment Variables
The SDK can automatically read credentials from environment variables. This is recommended for production deployments:
from bycloud import ByCloud# The SDK automatically reads from environment variables:# BYCLOUD_TOKEN or BYCLOUD_ACCESS_KEY_ID + BYCLOUD_SECRET_ACCESS_KEYclient = ByCloud()
Supported environment variables: BYCLOUD_TOKEN, BYCLOUD_ACCESS_KEY_ID, BYCLOUD_SECRET_ACCESS_KEY