Initialization
API Key
To use the Patronus SDK, you'll need an API key from the Patronus platform. If you don't have one yet:
- Sign up at https://app.patronus.ai
- Navigate to "API Keys"
- Create a new API key
Configuration
There are several ways to configure the Patronus SDK:
Environment Variables
Set your API key as an environment variable:
Configuration File
Create a patronus.yaml
file in your project directory:
Direct Configuration
Pass configuration values directly when initializing the SDK:
Verification
To verify your installation and configuration:
import patronus
patronus.init()
# Create a simple tracer
@patronus.traced()
def test_function():
return "Installation successful!"
# Call the function to test tracing
result = test_function()
print(result)
If no errors occur, your Patronus SDK is correctly installed and configured.
Next Steps
Now that you've installed the Patronus SDK, proceed to the Quickstart guide to learn how to use it effectively.