Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.24 KB

sessions.rst

File metadata and controls

38 lines (26 loc) · 1.24 KB

Available Session Implementations

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).

Synchronous Implementations

yadisk.sessions.requests_session.RequestsSession

yadisk.sessions.httpx_session.HTTPXSession

yadisk.sessions.pycurl_session.PycURLSession

Asynchronous Implementations

yadisk.sessions.aiohttp_session.AIOHTTPSession

yadisk.sessions.async_httpx_session.AsyncHTTPXSession

Importing Session Classes

You can use the following functions to import a session class by name:

yadisk.import_session

yadisk.import_async_session