Skip to content
PyRank
  • Search
  • PyPI
  • GitHub
  • Insights
  • Compare
  • Advisories
  • Ecosystem
  • About

Token Counting Python Packages

Python packages with the GitHub topic token-counting. Sorted by monthly downloads, with stars and forks.
phil65
tokonomics

Calculate LLM usage costs from token counts and discover models and pricing across providers

10K 6 1
sairintechnologycom
burnlens

Open-source LLM FinOps proxy — track OpenAI, Anthropic (Claude), and Google Gemini costs by feature, team, and customer. Zero code changes. pip install burnlens.

2K 3 0
peterwkdev-creator
claude-context-cost

How much each source (CLAUDE.md, rules, skills, memory, tool results) costs in the context of a Claude Code session, counted from the API usage in its transcript. Also a context budget for CI, and the git version of each file a session loaded.

2K 0 0
cendorhq
cendor-core

Wrap your LLM client once and capture exact token counts and cost on every call — the shared foundation the other Cendor tools build on.

1K 0 0
Mullassery
pytokencalc

Know your LLM costs before you hit send. Count tokens from 20+ providers with 99.9% accuracy. Estimate costs, track usage, optimize spending. No setup required.

842 0 0
cendorhq
cendor-acttrace

An automatic, tamper-evident log of your AI's decisions — every model and tool call is recorded and can be verified offline; change any past entry and the check fails.

706 0 0
cendorhq
cendor-tokenguard

Spending limits for LLM calls: stop a call before it runs if it would blow the budget, and see cost broken down per feature.

696 0 0
adam2go
puretiktoken

tiktoken in pure Python: byte-for-byte compatible BPE tokenizer for GPT-4/4o, no Rust extension, zero dependencies

622 0 0
Thibault00
runtoken

A blazing-fast BPE tokenizer for LLMs. Drop-in tiktoken replacement, 20-80x faster.

434 3 0
cendorhq
cendor-guardrails

Production plumbing for LLM apps: context, cost, testing & governance — composable, framework-agnostic Python libraries.

430 0 0
cendorhq
cendor-squeeze

Shrink long prompts to hit a token budget and expand them back exactly — the same input always produces the same output.

315 0 0
cendorhq
cendor-cassette

Record real LLM calls once, then replay them in your tests forever — offline, no API key, no cost, and the same result every run.

265 0 0
cendorhq
cendor-contextkit

Fit a prompt into the model's token budget — add your messages and context, pin what must stay, and the least-important parts are dropped to make it fit.

257 0 0
aryanjp1
tokenbudget

Lightweight token tracking, cost management, and budget enforcement for LLM API calls

228 6 1
cendorhq
cendor-libs

All seven Cendor libraries in one install — plain building blocks for LLM apps: context, cost, compression, a deterministic guardrails gate, testing, and a tamper-evident audit trail.

195 0 0
Wolfe-Jam
slash-tokens

Token budget estimation in 4.8 KB WASM. Sub-millisecond. Zero dependencies.

187 8 0
RLASAF12
context-budget

Claude Code context window budget calculator — know your token cost before you load

139 0 0
cendorhq
cendor

Brand alias for the Cendor stack — installs cendor-libs (the full suite). Prefer `pip install cendor-libs`.

106 0 0
mystxcal
filestoai

Export your codebase for AI consumption - CLI and Web Interface

89 2 0
stef41
tokonomix

Universal LLM token counting and cost management. Track, compare, and optimize your LLM API spending.

65 2 0
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology