Skip to main content

Basic Initialization

Initialize the SDK with your API key:

Configuration Options

Configure the client with additional options:

Environment Variables

Use environment variables for configuration:
Then initialize without explicit API key:

Async Initialization

For async applications:

Context Manager

Use as a context manager for automatic cleanup:

Client Methods

Once initialized, the client provides:
  • send_action() - Send action events
  • send_outcome() - Send outcome events
  • flush() - Manually flush buffered events
  • close() - Close the client and flush remaining events