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.9.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: anthropic-0.2.9.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.9.tar.gz
Algorithm Hash digest
SHA256 2d44564d362cced6e8e662366e4de7f94dcdc6cb61346a5e528359b0afc1f2f3
MD5 acc32aa3ad7bb1ba900cc349538adfbf
BLAKE2b-256 b74dc99d34d8ded48867cdda310f5c0eb84c77305bcc54d173d2d49a0c5ece9e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anthropic-0.2.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e7cce215cf6c446de29280deb31b07b5587993d48e84850eaad3fc69bd1fec0a
MD5 480fa7633fad161cd383f9c31225e643
BLAKE2b-256 7ed038a7cf5347bde8b5f08ff41f693c9cc6d25fd6a400618ddd23f61bff0441

See more details on using hashes here.

Supported by

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