Skip to main content

Overview

The BudClient supports multiple authentication methods for different deployment scenarios.

Authentication Methods

Most common method for production applications:

2. JWT Token

For server-to-server authentication:

3. Dapr Token

For services running in Dapr-enabled environments:

4. CLI Stored Credentials

After logging in with the CLI, credentials are stored locally:
Then use the client without explicit credentials:

5. Custom Base URL

For self-hosted or custom deployments:

Environment Variables

The SDK recognizes these environment variables:

CLI Authentication

Login

Authenticate via CLI:
This will prompt for your credentials and store them securely.

Check Status

Verify your authentication status:

Logout

Remove stored credentials:

Security Best Practices

Store API keys in environment variables instead of hardcoding them:
Use python-dotenv for local development:
Regularly rotate your API keys from the Bud platform dashboard.
Maintain separate API keys for development, staging, and production.

Example: Multi-Environment Setup

Troubleshooting

If you receive authentication errors:
  • Verify your API key is correct
  • Check that the key hasn’t expired
  • Ensure you’re using the correct base URL
  • Try logging in again with bud auth login
If Python can’t find the bud module: