Metadata-Version: 2.3
Name: tracelite
Version: 0.1.0
Summary: Lightweight request & response tracing for your Flask, Django, or FastAPI dev server
License: MIT
Author: Yeongseon Choe
Author-email: yeongseon.choe@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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
Provides-Extra: django
Provides-Extra: fastapi
Requires-Dist: pydantic (>=2.6,<3.0)
Requires-Dist: rich (>=13.7,<14.0)
Requires-Dist: sqlalchemy (>=2.0,<3.0)
Requires-Dist: tomli (>=2.0,<3.0)
Requires-Dist: typer (>=0.15,<0.16)
Description-Content-Type: text/markdown

# README.md
# Tracelite

**Lightweight request & response tracing for your Flask, Django, or FastAPI dev server**

Tracelite logs incoming HTTP requests and outgoing responses in a structured format. It's ideal for local development and debugging.

## Features
- 🔍 Logs method, path, status, duration, client IP, headers, body
- ⚙️ Configurable masking and path exclusion (via `tracelite.toml`)
- 📦 SQLite-based local storage
- 📊 Pretty CLI output using `rich`

## Installation
```bash
pip install tracelite[flask]
```

## Usage
### CLI
```bash
tracelite view
tracelite export --format json
```

### Flask Integration
```python
from flask import Flask
from tracelite.middleware.flask import TraceliteMiddleware
from tracelite.core.storage.sqlite import SQLiteStorage
from tracelite.core.config import load_config

app = Flask(__name__)
config = load_config()
storage = SQLiteStorage(db_path=config.db_path)

app.wsgi_app = TraceliteMiddleware(app.wsgi_app, storage, config)
```

## Configuration (tracelite.toml)
```toml
[storage]
type = "sqlite"
path = "tracelite.db"

[filter]
exclude_paths = ["/static", "/favicon.ico"]
mask_keys = ["password", "token"]
```

## Testing
```bash
poetry install --with dev
pytest
```

## Coverage Report
```bash
open htmlcov/index.html
```

## Requirementsgit add .
git commit -m "release: v0.1.0"
git push origin main
git tag v0.1.0
git push origin v0.1.0

- Python 3.9+
- Flask 3.x

---

MIT © Yeongseon Choe

