Currently, requests, and thus EsiPy, only supports HTTP/1.
hyperOne solution, and probably the easiest, is to use the hyper library.
You can find all hyper documentation here.
To install it, simply do pip install hyper
hyper and EsiPyOnce you installed hyper, you need to tell EsiPy to use it.
For this, you need to create a HTTP20Adapter from hyper and provide it to EsiPy (EsiClient and EsiSecurity may use it)
# import the hyper HTTPAdapter
from hyper.contrib import HTTP20Adapter
# create the EsiSecurity, adding transport_adapter adapter parameter
security = EsiSecurity(
redirect_uri='https://callback.com/you/set/on/developers/eveonline',
client_id='you client id',
secret_key='the_secret_key',
transport_adapter=HTTP20Adapter(),
)
# create the EsiClient, adding transport_adapter adapter parameter
client = EsiClient(
retry_requests=True,
headers={'User-Agent': 'Something CCP can use to contact you and that define your app'},
raw_body_only=False,
transport_adapter=HTTP20Adapter(),
)
And now, EsiPy will use HTTP/2