Installation

Installation

Get started with alphabench in minutes. Install the package and configure your API key.

Install alphabench

pip install alphabench

Get Your API Key

Get your API key from alphabench.in/developers (opens in a new tab)

Configure Your API Key

Set your API key as an environment variable:

export ALPHABENCH_API_KEY=albk_sk_your_key_here

Or set it programmatically in your Python code:

import alphabench
 
# Set API key for this session
alphabench.api_key = "albk_sk_your_key_here"

Verify Installation

Test that everything is working:

import alphabench
 
# Simple test
result, error = alphabench.chat("test strategy")
if error:
    print(f"Setup issue: {error}")
else:
    print("✅ alphabench is ready!")

Requirements

  • Python: 3.10 or higher
  • Dependencies: Automatically installed with pip
  • API Key: Required for all operations

Troubleshooting

Common Issues

Import Error: Make sure alphabench is installed correctly

pip install --upgrade alphabench

API Key Error: Verify your API key is set correctly

echo $ALPHABENCH_API_KEY  # Should show your key

Network Issues: Ensure you have internet access and can reach alphabench servers

Environment Setup

For persistent API key configuration, add to your shell profile:

Bash/Zsh (~/.bashrc or ~/.zshrc):

export ALPHABENCH_API_KEY="albk_sk_your_key_here"

Python virtual environments: Set the API key in your virtual environment's activation script or use a .env file:

# .env file
ALPHABENCH_API_KEY=albk_sk_your_key_here
# Load from .env file
from dotenv import load_dotenv
load_dotenv()

Next Steps

Now that alphabench is installed and configured:

  1. Quickstart - Try your first natural language strategy
  2. Features - Learn what alphabench can do
  3. Advanced Usage - Error handling and custom configurations

Visit alphabench.in (opens in a new tab) for more resources and examples.