Python SDK

Coming Soon

The 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-python

Basic 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.

ParameterTypeDefaultDescription
api_keystringNoneThe project API key. If not provided, reads from APISENSE_API_KEY.
base_urlstring"https://api.apisense.co.in"The APISense ingestion endpoint.
batch_sizeint100Number of requests to buffer before flushing.
flush_intervalfloat5.0Maximum seconds to wait before flushing the buffer.
sampling_ratefloat1.0Ratio of requests to record (0.0 to 1.0).