Skip to main content

Async Python client for the Eve Online ESI API

Project description

python-eveonline

PyPI Python License GitHub Release

Async Python client library for the Eve Online ESI API.

Built for use with Home Assistant but can be used standalone in any async Python project.

Features

  • Fully async — built on aiohttp
  • Typed models — all API responses are frozen dataclasses
  • Public endpoints — server status, character info, corporation info, portraits, universe name resolution
  • Authenticated endpoints — online status, location, ship, wallet, skills, skill queue, mail, industry jobs, market orders, jump fatigue
  • Abstract auth — implement AbstractAuth to provide your own token management (e.g. Home Assistant OAuth2)
  • Type-safe — PEP 561 compatible (py.typed), strict mypy configuration
  • Tested — 100% test coverage

Installation

pip install python-eveonline

Quick start

Public endpoints (no authentication required)

import asyncio
import aiohttp
from eveonline import EveOnlineClient

async def main():
    async with aiohttp.ClientSession() as session:
        client = EveOnlineClient(session=session)
        status = await client.async_get_server_status()
        print(f"{status.players} players online (version {status.server_version})")

asyncio.run(main())

Authenticated endpoints

To access character-specific data, implement the AbstractAuth class with your own token management:

from eveonline import EveOnlineClient
from eveonline.auth import AbstractAuth

class MyAuth(AbstractAuth):
    async def async_get_access_token(self) -> str:
        return "your-access-token"

auth = MyAuth(websession)
client = EveOnlineClient(auth=auth)

online = await client.async_get_character_online(character_id)
wallet = await client.async_get_wallet_balance(character_id)

Available endpoints

Method Scope required Returns
async_get_server_status() ServerStatus
async_get_character_public(id) CharacterPublicInfo
async_get_character_portrait(id) CharacterPortrait
async_get_corporation_public(id) CorporationPublicInfo
async_resolve_names(ids) list[UniverseName]
async_get_character_online(id) esi-location.read_online.v1 CharacterOnlineStatus
async_get_character_location(id) esi-location.read_location.v1 CharacterLocation
async_get_character_ship(id) esi-location.read_ship_type.v1 CharacterShip
async_get_wallet_balance(id) esi-wallet.read_character_wallet.v1 WalletBalance
async_get_skills(id) esi-skills.read_skills.v1 CharacterSkillsSummary
async_get_skill_queue(id) esi-skills.read_skillqueue.v1 list[SkillQueueEntry]
async_get_mail_labels(id) esi-mail.read_mail.v1 MailLabelsSummary
async_get_industry_jobs(id) esi-industry.read_character_jobs.v1 list[IndustryJob]
async_get_market_orders(id) esi-markets.read_character_orders.v1 list[MarketOrder]
async_get_jump_fatigue(id) esi-characters.read_fatigue.v1 JumpFatigue

Error handling

All exceptions inherit from EveOnlineError:

from eveonline import EveOnlineClient, EveOnlineError
from eveonline.exceptions import (
    EveOnlineAuthenticationError,  # 401/403 or missing auth
    EveOnlineConnectionError,      # Network/connection failures
    EveOnlineRateLimitError,       # 429 with optional retry_after
)

try:
    status = await client.async_get_server_status()
except EveOnlineAuthenticationError:
    # Token expired or invalid
    ...
except EveOnlineRateLimitError as err:
    # Back off for err.retry_after seconds
    ...
except EveOnlineError:
    # Any other ESI error
    ...

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_eveonline-0.2.2.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_eveonline-0.2.2-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file python_eveonline-0.2.2.tar.gz.

File metadata

  • Download URL: python_eveonline-0.2.2.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_eveonline-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e09e21eccfcb9c0f7e06a544fafd6a8d7fc4b334b48fda6d8edcb00e33ca2c43
MD5 24829d83ca1f1af52310466c0f3b0760
BLAKE2b-256 2545d759b50a201ff60c372ce17bf8cd4bac55d5f9966cea7cc2c78ff8d65d21

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_eveonline-0.2.2.tar.gz:

Publisher: ci.yml on ronaldvdmeer/python-eveonline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_eveonline-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_eveonline-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 12fbe76890034f9a23eefe875fa5a34f29c7b3bda951670d4dcdf0bfc0325c63
MD5 2584986b9962b382ecd522a2ecca5586
BLAKE2b-256 d44b65b6943e93d2986d8d937b9dc9c1abbf22284c672a823ced0cd454c7cd8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_eveonline-0.2.2-py3-none-any.whl:

Publisher: ci.yml on ronaldvdmeer/python-eveonline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page