Installation
Get started with alphabench in minutes. Install the package and configure your API key.
Install alphabench
pip install alphabenchGet 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_hereOr 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 alphabenchAPI Key Error: Verify your API key is set correctly
echo $ALPHABENCH_API_KEY # Should show your keyNetwork 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:
- Quickstart - Try your first natural language strategy
- Features - Learn what alphabench can do
- Advanced Usage - Error handling and custom configurations
Visit alphabench.in (opens in a new tab) for more resources and examples.