Metadata-Version: 2.4
Name: vibemonitor
Version: 0.1.1
Summary: Vibemonitor Python SDK — capture and send logs to Vibemonitor
Author-email: Vibemonitor <sdk@vibemonitor.ai>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://vibemonitor.ai
Project-URL: Documentation, https://docs.vibemonitor.ai/sdk/python
Project-URL: Repository, https://github.com/vibemonitor/vibemonitor-python
Project-URL: Issues, https://github.com/vibemonitor/vibemonitor-python/issues
Keywords: logging,observability,monitoring,logs,vibemonitor
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Logging
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.0

# Vibemonitor Python SDK

Capture and send application logs to [Vibemonitor](https://vibemonitor.ai) with one line of code.

## Installation

```bash
pip install vibemonitor
```

## Quick Start

```python
import vibemonitor

vibemonitor.init(api_key="your-api-key")
```

That's it. All your existing Python logging is now auto-captured and sent to Vibemonitor.

```python
import logging

logger = logging.getLogger("auth-service")

logger.info("User 46 logged in")              # → sent to Vibemonitor
logger.error("OTP expired for user 45")        # → sent to Vibemonitor
logger.exception("Payment failed")            # → sent with full traceback
```

## How It Works

1. **Auto-capture** — The SDK hooks into Python's built-in `logging` module. Every `logger.info()`, `logger.error()`, `logger.exception()` call is automatically captured.

2. **Non-blocking** — Logs are queued in memory and sent by a background thread. Your application is never slowed down.

3. **Compressed** — Logs are gzip-compressed before sending, reducing bandwidth by ~80%.

4. **Safe** — The SDK never crashes your application. All internal errors are silently handled.

## Get Your API Key

1. Log in to [vibemonitor.ai](https://vibemonitor.ai)
2. Go to **Settings** → **Services** → select your service
3. Copy the API key from the **SDK Setup** section

## Manual Logging

For logs outside the standard `logging` module:

```python
vibemonitor.log(
    severity="ERROR",
    message="Custom event occurred",
    attributes={"user_id": "45", "order_id": "991"}
)
```

## Configuration

```python
vibemonitor.init(
    api_key="your-api-key",
    environment="production",    # optional: from VIBEMONITOR_ENV env var
    version="2.3.1",             # optional: from VIBEMONITOR_VERSION env var
)
```

All settings can also be configured via environment variables in your `.env` file:

```env
VIBEMONITOR_ENDPOINT=https://api.vibemonitor.ai/api/v1/ingest/logs
VIBEMONITOR_ENV=production
VIBEMONITOR_VERSION=2.3.1
VIBEMONITOR_SCRUB_PATTERNS=email,ip,credit_card,password,jwt,aws_key
```

## Requirements

- Python 3.8+
- `httpx` (installed automatically)
