# EsiPy - A python swagger lib for ESI

**URL:** <https://forums.eveonline.com/t/esipy-a-python-swagger-lib-for-esi/14958>\
**Category:** Third Party Developers\
**Tags:** esi, library\
**Created:** [August 7, 2017, 5:48pm UTC](https://forums.eveonline.com/t/esipy-a-python-swagger-lib-for-esi/14958 "2017-08-07T17:48:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Althalus\_Stenory](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/althalus_stenory/32/429792_2.png) [@Althalus\_Stenory](https://forums.eveonline.com/u/Althalus_Stenory)\
**Post date:** [May 21, 2018, 9:05pm UTC](https://forums.eveonline.com/t/esipy-a-python-swagger-lib-for-esi/14958/4 "2018-05-21T21:05:00Z")

</div>

# Version 0.4.0 - Etag support !

## 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`)

---

_[View the full topic](https://forums.eveonline.com/t/esipy-a-python-swagger-lib-for-esi/14958)._
