Metadata-Version: 2.4
Name: codexray-sdk
Version: 0.1.1
Summary: CodeXRay telemetry SDK — watch your software think
Author: CodeXRay authors
License-Expression: MIT
Project-URL: Homepage, https://github.com/Gugilla-Aakash/Code-Xray
Project-URL: Repository, https://github.com/Gugilla-Aakash/Code-Xray
Project-URL: Issues, https://github.com/Gugilla-Aakash/Code-Xray/issues
Keywords: telemetry,observability,tracing,codexray,opentelemetry-alternative
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
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 :: Monitoring
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# codexray-sdk

Watch your software think. Zero-dependency Python telemetry for CodeXRay.

```bash
pip install codexray-sdk
cd your-project
codexray init                        # creates the CodeXRay project
codexray serve --app app.main:app    # serve with live tracing
codexray logs path/to/app.log        # tail a log file → dashboard Logs panel
codexray logs path/to/logs/          # or a whole directory of *.log/*.jsonl
# → open the printed dashboard link
```

On SaaS servers, `codexray init` prompts for your license key in a box
(one attempt — wrong key exits without writing `.codexray.json`). For
non-interactive use pass `--license KEY` or set `CODEXRAY_LICENSE_KEY`.
Open-source deployments without `CODEXRAY_LICENSE_KEY` configured skip the
prompt entirely.

Local development (from this repo):

```bash
pip install -e /path/to/sdk/python
```

Manual spans for deeper causality (DB calls, LLM calls, jobs):

```python
from codexray import Tracer

tracer = Tracer(service="my-api", api_url="http://127.0.0.1:3101", api_key="cxr_...")

with tracer.span("groq chat", service="groq", metadata={"model": "llama-3.1-8b-instant"}):
    answer = chat(...)
```

`codexray doctor` checks API reachability + auth. Telemetry failures never
raise into your app.
