Skip to main content

CLI to return number of Claude tokens in your text

Project description

Claude Token Count

Simple way to use the Anthropic token counting endpoint docs.

Must have ANTHROPIC_API_KEY set in your environment.

> uvx claude-token-count "Hello, world"
{"input_tokens":10}

or

> echo "Hello, world" | uvx claude-token-count
{"input_tokens":10}

Have fun!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_token_count-0.1.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_token_count-0.1.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file claude_token_count-0.1.1.tar.gz.

File metadata

  • Download URL: claude_token_count-0.1.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for claude_token_count-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a0c0cfc1a57f9a0a709978b007e475794c016fc50ae0919e48c74398225283ac
MD5 a1762a05f32f5aa829c1e6be3d9c0d8e
BLAKE2b-256 2c7a08c384ba17de827583da15d8ebb827daef444407721a2a7f9eca1ad4f23f

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_token_count-0.1.1.tar.gz:

Publisher: pypi.yml on sergeyk/claude-token-count

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file claude_token_count-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_token_count-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c743c7358c0daf56a19fa40d322902ac38f83ae68fd4cd7fbcaa9cd6829e74f6
MD5 8f10bf832a3c490353418026fde56173
BLAKE2b-256 2d4ef5e48bb4f3e84ab9be174efbc350e265fe31b4f32287d49aa37777aab773

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_token_count-0.1.1-py3-none-any.whl:

Publisher: pypi.yml on sergeyk/claude-token-count

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page