ESICelery
ESI API requests library using RabbitMQ, celery tasks queues, and Redis caching.
Installation
pip install ESICelery
Usage
Starting the Celery worker server
From CLI
Set the following environmental variables and then run ESICelery from the CLI. Variables: BrokerUser, BrokerPassword, BrokerHost, BrokerPort, BrokerVhost, ResultBackendUser, ResultBackendPassword, ResultBackendHost, ResultBackendPort, ResultBackendDb
python ESICelery
From your code
From your worker code start the Celery worker server that handles running tasks:
from ESICelery.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 ESICelery in your code
From another Python script you can send tasks to the queues and receive results:
from ESICelery.CeleryApps import CeleryWorker
from ESICelery.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 | ESICelery 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
Metadata
Release files for ESICelery 0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ESICelery-0.12.tar.gz | 25.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ESICelery-0.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.9 kB
Release files / ESICelery-0.12.tar.gz
| Download URL | ESICelery-0.12.tar.gz |
|---|---|
| Size | 25.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b5e08b132646c3b939c6d23044ec814ba30fb4c495294aa129846dbba0ddddd
|
|
BLAKE2b-256 checksum How to use checksums |
ff0b2e54ab12d56250c80a6fba1f8f93f7ab8b5e2e8861873b1702b01a35be9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / ESICelery-0.12-py3-none-any.whl
| Download URL | ESICelery-0.12-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24fe3d461cf7335e9cbf0648454a7c6528fab9c940258d54ba0ddc9da4fddd83
|
|
BLAKE2b-256 checksum How to use checksums |
8430323fd8137e2a0c65aa72eb7fe0781447206112cfd0db03f39c94149f0374
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for ESICelery 0.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.