A simple library for asynchronous ESI requests
Project description
esi_requests
esi_requests tries to use requests style methods:
>>> import esi_requests
>>> r = esi_requests.get("/markets/{region_id}/orders/", region_id=10000002, type_id=1403)
>>> r.status
200
>>> r.json()
{[{'duration': 90, 'is_buy_order': False, ...}
with async enabled and simplified:
>>> resps = esi_requests.get("/markets/{region_id}/orders/", region_id=10000002, type_id=[1403, 12005, 626])
# equivalent to: esi_requests.get("/markets/{region_id}/orders/", region_id=10000002, params={"type_id": [1403, 12005, 626]})
>>> resps
[<Response [200]>, <Response [200]>, <Response [200]>]
>>> resps[0].status
200
>>> resps[0].url
'https://esi.evetech.net/latest/markets/10000002/orders/?datasource=tranquility&order_type=all&page=1&type_id=1403'
which internally uses aiohttp to send requests asynchronously.
Features
- One-line
async
enabled: no need to master aiohttp and asyncio - Simple
requests
-like api - Simplified
OAuth2
SSO authentication: all you need is to log in your account - Support
ETag
headers: compliant with ESI recommendation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
esi_requests-0.0.1.8.tar.gz
(34.5 kB
view hashes)
Built Distribution
Close
Hashes for esi_requests-0.0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c164712d3ad377e5d3bcc319044a4b08fbf557bc5d0e6f86d71da9e36e00f23f |
|
MD5 | 8ffb157a4c1025758fec939dca77204d |
|
BLAKE2b-256 | da9d0953529bcec68443ae4a5fc55b70bb32b715995de8a1c626c6b1919f5426 |