Patch your LLM client with one import and see real-time token costs in your terminal.
Project description
TokenShark
Patch your LLM client with one import and see real-time token costs in your terminal.
import tokenshark
tokenshark.monitor()
# OpenAI and Anthropic calls are now logged with cost, latency, and
# (optionally) your own metadata tags.
Status
Early build — core patching + SQLite cost tracking (proxy.py,
tracker.py, config.py, exceptions.py) is in place. cli.py,
dashboard.py, alerts.py, and tests are still to come.
Install (once published)
pip install tokenshark[openai,anthropic]
This is a placeholder — pyproject.toml's readme field points here,
and hatchling needs the file to exist to build package metadata at all,
so pip install -e . would fail on a fresh clone without it. Not one of
the 5 requested files — added purely to keep today's pip install -e .
from breaking. Replace with a real README on Day 3 polish.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tokenshark_bin-0.1.0.tar.gz.
File metadata
- Download URL: tokenshark_bin-0.1.0.tar.gz
- Upload date:
- Size: 55.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f26cce23c458bbf32b91b21a092a85d9ac412257d33f45ea9531d2a68e1d0484
|
|
| MD5 |
3499c7c8d2fec2d7b0eef34243bd9ec5
|
|
| BLAKE2b-256 |
b659cf6d8902a3c0615b573bee352822314941b4f4316ac0cbf767312f544b58
|
File details
Details for the file tokenshark_bin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tokenshark_bin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
229c8740e2ca94b7e718696e07a0ba0a8574c923c6a2fae744fdd7e951452363
|
|
| MD5 |
49c5fcd2a03c191726222b5973705691
|
|
| BLAKE2b-256 |
a17ba9fc3100464c7022ebca88a3ddc83be6dd84d825b364a63cd1527de2715c
|