less-tokens

v0.8.2 safe
3.0
Low Risk

Cut LLM prompt token costs by 30-40% with deterministic, training-free lexical compression for OpenAI, Anthropic, Gemini and any LLM API. Zone-aware compression protects JSON schemas and output formats; PDFs and Word files reduce to Markdown. Includes a 6-metric quality evaluator. The optional agent extra adds a local-first chat app: a local Ollama model answers what it can, a router escalates the rest to the cheapest frontier model, with automatic RAG, rolling chat summaries and a token ledger in SQLite.

📦 Package Quality Overall: Medium (5.0/10)

◈ Medium Test Suite 6.0

Partial test coverage signals detected

  • 1 test file(s) detected (e.g. test_basic.py)
◈ Medium Documentation 7.0

Some documentation present

  • Documentation URL: "Documentation" -> https://github.com/shaminchokshi/less-tokens#readme
  • Detailed PyPI description (64922 chars)
○ Low Contributing Guide 4.0

No contributing guide or governance files found

  • Development Status classifier >= Beta
◈ Medium Type Annotations 7.0

Partial type annotation coverage

  • Classifier: Typing :: Typed
  • 197 type-annotated function signatures detected in source
○ Low Multiple Contributors 1.0

Could not retrieve contributor data from GitHub

  • GitHub API error: 401

🔬 Heuristic Checks

⚠ Outbound Network Calls score 9.0

Found 6 network call pattern(s)

  • ne}""" try: r = httpx.get(f"{BASE}/api/tags", timeout=httpx.Timeout(3.0)) r.r
  • num_predict}, } r = httpx.post(f"{BASE}/api/chat", json=payload, timeout=_TIMEOUT) r.r
  • alse try: r = httpx.post(f"{BASE}/api/chat", json=payload, timeout=_TIMEOUT)
  • """ try: r = httpx.post(f"{BASE}/api/generate", timeout=_TIMEOUT,
  • .decode("ascii") r = httpx.post(f"{BASE}/api/chat", timeout=_TIMEOUT, json={ "m
  • time() try: r = httpx.post(provider["base_url"].rstrip("/") + path,
⚠ Code Obfuscation score 4.0

Found 2 obfuscation pattern(s)

  • no image data.") raw = base64.b64decode(b64) return {"data_uri": "data:image/png;base64," + b64
  • D: try: __import__(mod) except ImportError: missing.append(mo
⚠ Shell / Subprocess Execution score 2.0

Found 1 shell execution pattern(s)

  • re, and shell=False. subprocess.Popen([exe, "serve"], **kwargs) except Exception as exc:
✓ Credential Harvesting

No credential harvesting patterns detected

✓ Typosquatting

No typosquatting candidates detected

✓ Registered Email Domain

Email domain looks legitimate: gmail.com>

⚠ Suspicious Page Links score 8.0

Found 4 suspicious link(s) on the package page

  • Non-HTTPS external link: http://127.0.0.1:8000
  • Non-HTTPS external link: http://127.0.0.1:8000/docs
  • Non-HTTPS external link: http://127.0.0.1:8000/health
  • Non-HTTPS external link: http://127.0.0.1:8000/app**
⚠ Git Repository History score 3.0

GitHub API error: 401

  • GitHub API error: 401
⚠ Maintainer History score 4.0

2 maintainer concern(s) found

  • Author name is missing or very short
  • Author "" appears to have only 1 package on PyPI (new or inactive account)
✓ Known CVE Vulnerabilities

No known vulnerabilities found in OSV database.

💡 AI App Starter Prompt

Use this prompt to build a project with less-tokens
Build a simple Python application using the less-tokens package to demonstrate its core features.

💬 Discussion Feed

Leave a comment

No discussion yet. Be the first to share your thoughts!