EsiPy is a python library for ESI API that dynamically generate everything using the swagger.json
.
It is written on top of pyswagger (which does the boring stuff) but rewrites some objects from it, to add functionalities to deal with some specific use case:
- EVE SSO Auth (generate auth url, tokens stuff, adds the
Bearer
header)
- Caching the responses
- Auto retry on 5xx error and parallel requests
The library is compatible with python 2.7
and 3.3+
.
How to get started with EsiPy
Simply include it in your project using pip install esipy
and there you are !
Documentations / examples ? I have questions / issues
You can find a complete (I hope so) documentation and some examples here:
If you have any issue, questions or maybe you need a little help, you can either:
- Ask here
- Create an issue on EsiPy Github
- Ask me on tweetfleet (@althalus)
7 Likes
Posting here also, as I made a small breaking change, so more users may see it
Version 0.2.0
Change :
-
EsiSecurity
object no longer require app
object to be initialized to get SSO Urls (authorize, token).
- You can still use it, as before and your app will still work the same as before
- You can manually give a
sso_url
instead, to say whether you want SISI / TQ SSO (default is TQ) instead of the app object.
- If both are given, priority is set to the
app
object.
- Use of https://esi.tech.ccp.is/verify/ for verify instead of the sso endpoint (https://login.eveonline.com/oauth/verify)
This introduce a small breaking change if you init EsiSecurity
without keyword, since app
parameter is no longer the first parameter. You need to:
- either use keywords to init
- or put
app
parameter in the 4th parameter [not recommended]
1 Like
Version 0.3.0 - Contains potential breaking changes.
Changes
- Do not try to cache response if there’s no
expires
information (#22)
- Fix cache behavior to be the same everywhere. See details below.
-
Breaking changes :
- Renamed signal instances to be fully capitalized.
-
after_token_refresh
become AFTER_TOKEN_REFRESH
-
api_call_stats
become API_CALL_STATS
- Renamed the following
EsiSecurity
methods:
-
get_access_token_request_params
to become get_access_token_params
-
get_refresh_token_request_params
to become get_refresh_token_params
New Feature: EsiApp
EsiApp is an object that will be used to play with ESI Meta Swagger spec.
That mean you will be able to easily get meta endpoints, like /verify
, /status
the same way as the current App object, but it allows you to also get all current swagger spec used in ESI, for versionned endpoint and others.
Please look at the doc for how to use it.
Caching behavior change
Until now, cache objects worked differently when timeout was equal to 0
or None
depending on which engine you used for caching.
To prevent error if switching between engine and to have consistent behavior, if timeout now equals 0
or None
, the data will not expire.
1 Like