Skip to main content

Python SDK Installation

The Meter Python SDK provides a clean, Pythonic interface for all Meter API operations.

Requirements

  • Python 3.8 or later
  • pip or uv for package management

Install with pip

pip install meter-sdk

Install with uv

uv add meter-sdk

Install from source

For development or to use the latest unreleased features:
git clone https://github.com/yourusername/meter-sdk
cd meter-sdk
pip install -e .

Verify installation

from meter_sdk import MeterClient

print("Meter SDK installed successfully!")

Set up authentication

Store your API key as an environment variable:
export METER_API_KEY="sk_live_your_key_here"
For persistent configuration, add to your ~/.bashrc, ~/.zshrc, or .env file:
.env
METER_API_KEY=sk_live_your_key_here
Load environment variables in Python:
from dotenv import load_dotenv
import os

load_dotenv()  # Load from .env file

api_key = os.getenv("METER_API_KEY")

Quick test

Verify your setup with a quick test:
from meter_sdk import MeterClient
import os

# Initialize client
client = MeterClient(api_key=os.getenv("METER_API_KEY"))

# List your strategies (should return empty list if you haven't created any)
strategies = client.list_strategies()
print(f"Found {len(strategies)} strategies")

# Success! You're ready to use Meter

Dependencies

The SDK has minimal dependencies:
  • requests: HTTP client for API calls
  • typing-extensions: Type hints for older Python versions
All dependencies are installed automatically.

Updating

Keep your SDK up to date:
pip install --upgrade meter-sdk

Troubleshooting

Solution: Install the package:
pip install meter-sdk
If using a virtual environment, ensure it’s activated.
Problem: Package installed but import failsSolutions:
  • Check you’re in the correct Python environment: which python
  • Verify installation: pip show meter-sdk
  • Try reinstalling: pip uninstall meter-sdk && pip install meter-sdk
Problem: Dependency conflicts with other packagesSolution: Use a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install meter-sdk

Next steps

Need help?

Email me at [email protected]