Installation¶
Requirements¶
- Python 3.9+
- An API key from app.canard.cloud
Install the SDK¶
Save Your API Key¶
You can authenticate three ways. The SDK checks them in this order:
Option 1: Environment Variable (recommended for CI)¶
Option 2: Credentials File (recommended for local dev)¶
This saves to ~/.canard/credentials with 0600 permissions.
Option 3: Pass Directly¶
from canard import Client
client = Client(api_url="https://api.canard.cloud", api_key="your_api_key")
Verify¶
from canard import Client
client = Client(api_url="https://api.canard.cloud")
status = client.get_queue_status()
print(f"Platform: {status.active_workers} workers online")
If this prints without error, you're ready to go.