Esipy

Latest version: v1.2.3

Safety actively analyzes 631143 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

0.4.0

Cache - Possible breaking change
* All cache have lost the timeout parameter in `set()` method.
* If you have a custom cache with timeout, you should remove it, as it will not allow the Etag process to be used. If you keep it with a default value, it will continue to work.

EsiClient
* Do not cache `POST`, `PUT` and `DELETE` requests anymore
* Support for head requests
* Add `Etag` mechanism in the cache management
* Allow to set a `raise_on_error` flag in `EsiClient.request()` to get an exception when status is not 2XX.
* Add a `timeout` value for requests in the `EsiClient.__init__()` to force timeout requests (default is `None`)
* Allow to define a custom Signal to replace `API_CALL_STATS` using `signal_api_call_stats` when initializing the client.

EsiSecurity
* Allow to define a custom Signal to replace `AFTER_TOKEN_REFRESH` using `signal_token_updated` when initializing the client.
* Add a token identifier that will be returned to the `AFTER_TOKEN_REFRESH` signal listeners, so it can identify a token

APIException
* Added request_param and response_header to the Exception, to have more precise data for error management

EsiApp
* `cache_time` parameter value has changed. Number and 0 will still behave like before (forcing a cache time or no expiration with `0`), `None` will disable forced cache time and use `Expires` header from swagger specifications. Default is still 1d caching.
* While getting swagger spec (meta or any version), `EsiApp` will make sure to deal correctly with caching (headers `Expires` and `Etag`) by doing a `HEAD` request before (due to how `App` object works).
* Add a `datasource` argument on initialization, to be able to get swagger spec for specific datasource (`tranquility` by default, or `singularity`)

0.3.4

- Change the ESI URL `esi.tech.ccp.is` to `esi.evetech.net`
- Added warning if the user does not provide `User-Agent` headers to EsiClient and EsiSecurity

0.3.3

* Fix `EsiSecurity.verify()` when not using tranquility. (akakjs 30)

0.3.2

* Allow the user to set a custom `cache_prefix` when creating `EsiApp` so the prefix are controlled by the user. Default value is still `esipy`
* Renamed `EsiApp.force_update()` into `EsiApp.clear_cached_endpoints(prefix=None)`. Now `clear_cached_endpoints` only clear cache for the cache_prefix (either the one defined when creating `EsiApp` or the one given as parameter. All endpoints objects are recreated upon next call automatically.

0.3.1

- Added fix in client to avoid outdated results: `expires` header in the past (27 thanks to cbz)
- Added cache for meta endpoint in `EsiApp` as this one was not cached
- Prefixed cache key with `esipy:` to prevent easy cache key collision if someone uses its own cache.

0.3.0

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 :**
* Rename 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. <br>
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. <br>
To prevent error if switching between engine and to have consistent behavior, if timeout now equals `0` or `None`, the data will not expire.

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.