Skip to main content

Library for accessing the anthropic API

Project description

Anthropic Python SDK

This python repo provides access to Anthropic's safety-first language model APIs.

For more information on our APIs, please check out Anthropic's documentation.

How to use

Install the package with:

pip install anthropic

Then write code with:

import anthropic
client = anthropic.Client(api_key=<insert token here>)
client.XXX # look to examples/ directory for code demonstrations

How to develop and run the examples in this repo

pip install .
export ANTHROPIC_API_KEY=<insert token here>
python examples/basic_sync.py
python examples/basic_stream.py
python examples/count_tokens.py

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

anthropic-0.2.10.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

anthropic-0.2.10-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file anthropic-0.2.10.tar.gz.

File metadata

  • Download URL: anthropic-0.2.10.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for anthropic-0.2.10.tar.gz
Algorithm Hash digest
SHA256 e4da061a86d8ffb86072c0b0feaf219a3a4f7dfddd4224df9ba769e469498c19
MD5 aa6dddff59629a7fa033c7d89dc74f94
BLAKE2b-256 a9dd119d457661149817aa1ac6f9e262ba6763c0ecbda82b7e67756e8be0fc4c

See more details on using hashes here.

File details

Details for the file anthropic-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: anthropic-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for anthropic-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 a007496207fd186b0bcb9592b00ca130069d2a427f3d6f602a61dbbd1ac6316e
MD5 b0293ba7f7fabe6e97c706fec877b6bf
BLAKE2b-256 0b3a6e609e7162833ed87762656f902f2fe1009ad93f794a1c5b270bea0fb039

See more details on using hashes here.

Supported by

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