项目作者: alentoghostflame

项目描述 :
An EVE Python 3 library for quickly accessing the Static Data Export and EVE Swagger Interface, returning easy to use objects.
高级语言: Python
项目地址: git://github.com/alentoghostflame/EVE-Python-Library.git
创建时间: 2020-06-29T17:56:53Z
项目社区:https://github.com/alentoghostflame/EVE-Python-Library

开源协议:MIT License

下载


PyEVELib

An async library to access the Static Data Export (SDE) and EVE Swagger Interface (ESI) in a unified way.

Features

  • It’s async.
  • Can download the SDE, unpack it automatically, and check if the current SDE is out of date.
  • Doesn’t require the SDE, and can use ESI for info instead.
  • Supports ESI ratelimiting.
  • Caches ESI requests by default, supports both route expiries and ETags.

Requirements

  • Python 3.10+
  • aiohttp
  • PyYAML

How to use

  1. import asyncio
  2. from evelib import EVEAPI
  3. async def main():
  4. eve = EVEAPI()
  5. # If you want to use the SDE.
  6. eve.sde.update_sde() # This checks for updates, downloads, and unpacks the SDE as needed.
  7. eve.load_sde() # Loads the SDE from disk.
  8. resolved = await eve.resolve_universe_ids(["Jita"])
  9. jita_id = resolved.systems["Jita"]
  10. jita = await eve.get_solarsystem(jita_id)
  11. print(f"{jita.name}, {jita.id}, {jita.security}")