Claude Libraries
Anthropic provides SDKs for Python (3.7+) and TypeScript (4.5+).
Python
Create a virtual environment
In your project directory, create a virtual environment:
python -m venv claude-env
Activate the virtual environment
- On macOS or Linux:
source claude-env/bin/activate
- On Windows:
claude-env\Scripts\activate
Install the SDK
pip install anthropic
TypeScript
Install the SDK
npm install @anthropic-ai/sdk