Python SDK
Coming SoonThe official APISense Python client for collecting and sending telemetry data.
Under Development: The APISense Python SDK is currently being built and is not yet available. The documentation below represents the planned API and configuration options.
Installation
Install the SDK via pip. It is compatible with Python 3.8 and newer.
pip install apisense-pythonBasic Setup
Import and initialize the APISenseClient. By default, it will look for the APISENSE_API_KEY environment variable.
from apisense import APISenseClient
# Initializes using APISENSE_API_KEY from environment
client = APISenseClient()
# Or pass explicitly
client = APISenseClient(api_key="sk_proj_...")Configuration Options
The client accepts several configuration parameters to fine-tune its performance and buffering behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | string | None | The project API key. If not provided, reads from APISENSE_API_KEY. |
base_url | string | "https://api.apisense.co.in" | The APISense ingestion endpoint. |
batch_size | int | 100 | Number of requests to buffer before flushing. |
flush_interval | float | 5.0 | Maximum seconds to wait before flushing the buffer. |
sampling_rate | float | 1.0 | Ratio of requests to record (0.0 to 1.0). |