You can choose which HTTP library will be used by Client
and AsyncClient
by specifying the session
parameter. Below you can see the list of session implementations that are shipped with the yadisk
library.
Alternatively, you can make your own Session
/AsyncSession
implementation. For a concrete example, take a look at the source code of any existing implementations (e.g. HTTPXSession
).
yadisk.sessions.requests_session.RequestsSession
yadisk.sessions.httpx_session.HTTPXSession
yadisk.sessions.pycurl_session.PycURLSession
yadisk.sessions.aiohttp_session.AIOHTTPSession
yadisk.sessions.async_httpx_session.AsyncHTTPXSession
You can use the following functions to import a session class by name:
yadisk.import_session
yadisk.import_async_session