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 hashes)
Built Distribution
Close
Hashes for anthropic-0.2.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7cce215cf6c446de29280deb31b07b5587993d48e84850eaad3fc69bd1fec0a |
|
MD5 | 480fa7633fad161cd383f9c31225e643 |
|
BLAKE2b-256 | 7ed038a7cf5347bde8b5f08ff41f693c9cc6d25fd6a400618ddd23f61bff0441 |