Python SDK Quickstart
Get started with the Claro Python SDK in just a few lines of code.Prerequisites
- Python 3.8 or higher
- Claro SDK installed (
pip install baytos-claro) - API key from Claro settings
Installation
Install the SDK using pip:Basic Usage
Understanding Package Names
Claro uses semantic versioning for prompts:@workspace- Your workspace identifierprompt-name- The prompt’s name (lowercase, hyphenated)version- The version (e.g.,v1,v2,latest)
Working with Prompt Versions
Using Prompts with LLMs
OpenAI Example
Anthropic Example
Listing Prompts
Error Handling
Complete Example
Here’s a complete working example:Environment Variables
Create a.env file for local development:
.env
Next Steps
Client Configuration
Configure timeouts, retries, and connection pooling
Working with Prompts
Learn about prompt metadata and versioning
Context Files
Handle file attachments and URLs
Error Handling
Robust error handling patterns