Skip to content

Quickstart

knowlen edited this page Jul 16, 2025 · 3 revisions

Quickstart Guide

Get up and running with ESO Logs Python in 5 minutes!

Prerequisites

  • Python 3.8 or higher
  • ESO Logs account (free)
  • Basic Python knowledge

1. Installation

# Install from PyPI
pip install esologs-python

# Or for latest development version
pip install git+https://github.com/knowlen/esologs-python.git@main

2. Get API Credentials

  1. Visit ESO Logs API Clients
  2. Create a new client application
  3. Copy your Client ID and Client Secret

3. Set Credentials

export ESOLOGS_ID="your_client_id"
export ESOLOGS_SECRET="your_client_secret"

4. First API Call

Create a file test_esologs.py:

import asyncio
from esologs.client import Client
from esologs.auth import get_access_token

async def main():
    # Get authentication token
    token = get_access_token()
    
    # Create client
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:
        
        # Check rate limits
        rate_limit = await client.get_rate_limit_data()
        print(f"✅ Connected to ESO Logs API!")
        print(f"Rate limit: {rate_limit.rate_limit_data.limit_per_hour}/hour")
        print(f"Points used: {rate_limit.rate_limit_data.points_spent_this_hour}")

# Run it
asyncio.run(main())

Run the script:

python test_esologs.py

You should see:

✅ Connected to ESO Logs API!
Rate limit: 18000/hour
Points used: 0

5. Explore More

Now try getting some game data:

async def explore_data():
    token = get_access_token()
    
    async with Client(
        url="https://www.esologs.com/api/v2/client",
        headers={"Authorization": f"Bearer {token}"}
    ) as client:
        
        # Get character classes
        classes = await client.get_classes()
        print("\nCharacter Classes:")
        for cls in classes.game_data.classes:
            print(f"  - {cls.name}")
        
        # Get zones
        zones = await client.get_zones()
        print(f"\nTotal Zones: {len(zones.world_data.zones)}")

asyncio.run(explore_data())

Next Steps

Common Issues

Authentication Failed

Make sure your environment variables are set correctly:

echo $ESOLOGS_ID
echo $ESOLOGS_SECRET

Rate Limit Exceeded

The API has rate limits. Use get_rate_limit_data() to monitor your usage.

Import Errors

Make sure you're in the project directory and have installed with pip install -e .

Need Help?