Metadata-Version: 2.4
Name: spectracost
Version: 0.2.3
Summary: AI cost observability SDK - see the full spectrum of your AI spend
Project-URL: Homepage, https://github.com/spectracost/python-sdk
Project-URL: Issues, https://github.com/spectracost/python-sdk/issues
Project-URL: Source, https://github.com/spectracost/python-sdk
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: anthropic>=0.30; extra == 'dev'
Requires-Dist: openai>=1.0; extra == 'dev'
Requires-Dist: pytest-httpserver>=1.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# Spectracost Python SDK

See the full spectrum of your AI spend.

```python
from openai import OpenAI
from spectracost import instrument

client = instrument(
    OpenAI(),
    api_key="sprc_...",
    team="search",
    service="query-rewriting",
)

# Use exactly like a normal OpenAI client - now with cost tracking
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}],
)
```
