Skip to main content

Task queue framework for building tools that interact with the EVE Online ESI API using Celery, RabbitMQ, and Redis.

Project description

EVECelery

PyPI Documentation Status EVECelery GitHub

EVECelery is a task queue framework for building tools that interact with the EVE Online ESI API using Celery, RabbitMQ, and Redis.

With EVECelery you can easily distribute ESI calls through task queues built on top of Celery across a fleet of worker nodes. You can build on top of EVECelery to create your own custom ESI tools defining your own tasks and scheduled jobs.

Installation

pip install EVECelery

Usage

Starting the Celery worker server

From CLI

Set the following environmental variables and then run EVECelery from the CLI. Variables: BrokerUser, BrokerPassword, BrokerHost, BrokerPort, BrokerVhost, ResultBackendUser, ResultBackendPassword, ResultBackendHost, ResultBackendPort, ResultBackendDb

eve-celery

From your code

From your worker code start the Celery worker server that handles running tasks:

from EVECelery.CeleryApps import CeleryWorker

c = CeleryWorker(broker_user="user", broker_password="pass", broker_host="host", broker_port=5672, broker_vhost="esi",
                 result_user="user", result_password="pass", result_host="host", result_port=6379, result_db=0,
                 header_email="youremail@example.com")

c.start(
    max_concurrency=10)  # Start celery app - equivalent to running "celery worker -l WARNING --autoscale 10,1 -Q queues"

Using EVECelery in your code

From another Python script you can send tasks to the queues and receive results:

from EVECelery.CeleryApps import CeleryWorker
from EVECelery.tasks.Universe import *

c = CeleryWorker(broker_user="user", broker_password="pass", broker_host="host", broker_port=5672, broker_vhost="esi",
                 result_user="user", result_password="pass", result_host="host", result_port=6379, result_db=0,
                 header_email="youremail@example.com")  # only need to call this once in our code to init the tasks
r = SystemInfo().get_sync(timeout=5, system_id=30000142)
print(r)

Current supported endpoints

ESI Route EVECelery Task
/alliances/{alliance_id}/ AllianceInfo()
/characters/{character_id}/ CharacterPublicInfo()
/corporations/{corporation_id}/ CorporationInfo()
/markets/prices/ PricesList()
/universe/categories/{category_id}/ CategoryInfo()
/universe/constellations/{constellation_id}/ ConstellationInfo()
/universe/factions/ FactionsList()
/universe/groups/{group_id}/ GroupInfo()
/universe/regions/{region_id}/ RegionInfo()
/universe/systems/{system_id}/ SystemInfo()
/universe/types/{type_id}/ TypeInfo()

Examples

See the included example scripts under docs/examples

Copyright Notice

See CCP.md

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

EVECelery-0.18.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

EVECelery-0.18-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file EVECelery-0.18.tar.gz.

File metadata

  • Download URL: EVECelery-0.18.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for EVECelery-0.18.tar.gz
Algorithm Hash digest
SHA256 ee7d9c4e6e7bcde2f98be660753041e232c5c9bddd612bf8cf79c4ec09d2c050
MD5 5393265a93dada6754804e3dc7484744
BLAKE2b-256 3182fe6779d929346a3b94cb907675fde22a8af45e6944b5167ce77d7b7d598f

See more details on using hashes here.

File details

Details for the file EVECelery-0.18-py3-none-any.whl.

File metadata

  • Download URL: EVECelery-0.18-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for EVECelery-0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 4d9cd066d14b327b7d18a875f82b7766e8945dbb535a33347bc74fa5b13f2d28
MD5 dd168e5b13472be1c5d4f4f7cc23cb65
BLAKE2b-256 7ec31c8e80f9c482e1ddd1b410bd6785338f7a3fa504d5fe0ff4368a2dbf8d14

See more details on using hashes here.

Supported by

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