Metadata-Version: 2.4
Name: xpectra-client
Version: 0.1.0
Summary: Minimal Python client for Xpectra telemetry ingest
Project-URL: Homepage, https://github.com/xpectraflow/xpectra-client
Project-URL: Repository, https://github.com/xpectraflow/xpectra-client
Project-URL: Bug Tracker, https://github.com/xpectraflow/xpectra-client/issues
Author-email: Arush Kumar Singh <engineermechd@gmail.com>
License: MIT
Keywords: grpc,sensor,telemetry,timeseries,xpectra
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: grpcio
Requires-Dist: grpcio-tools>=1.76.0
Requires-Dist: pandas>=2.3.3
Requires-Dist: protobuf>=5.28.0
Requires-Dist: requests>=2.33.1
Description-Content-Type: text/markdown

# Xpectra Python SDK 🚀

The official Python SDK for Xpectra. This library provides a high-level, fluent API for telemetry discovery, ingestion, and querying.

## ✨ Features

- **Fluent Discovery**: Easily browse experiments, datasets, and channels.
- **Strictly Typed**: Full Python types for experiments, datasets, and sensors.
- **Pandas Integration**: Load telemetry data directly into DataFrames.
- **Batch & Stream Ingest**: Support for high-performance telemetry submission.
- **Org-scoped Auth**: Secure authentication using organization API keys.

## 📦 Installation

```bash
# Using uv (recommended)
uv add xpectra-client

# Using pip
pip install xpectra-client
```

## 🚀 Quick Start

```python
from xpectra import Client
import pandas as pd
from datetime import datetime

# Initialize the client
client = Client(
    api_key="sk_xp_...",
    endpoint="localhost:50051", # gRPC ingest endpoint
    base_url="http://localhost:3000" # Web API base URL
)

# 1. Discover data
dataset = client.get_dataset("Pulse 3", experiment_id="...")
print(f"Dataset status: {dataset.metadata.status}")

# 2. Ingest data
df = pd.DataFrame({
    "Temperature": [22.5, 23.1],
    "Pressure": [1013, 1012]
}, index=[datetime.now(), datetime.now()])

dataset.ingest(df)

# 3. Load data
loaded_df = dataset.load(limit=100)
print(loaded_df.head())
```

## 📚 Examples

Check the `examples/` directory for more:
- `full_client_demo.py`: Comprehensive metadata and discovery walkthrough.
- `stream_csv.py`: Ingest data from CSV files.
- `api_key_auth.py`: Authentication patterns.

## 🔐 Authentication

Generate your API key in the Xpectra dashboard under **Settings → API Keys**.

---
© 2026 Xpectra. All rights reserved.
