File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,22 @@ Basic initialization which is going to work for everybody:
2121
2222 northwind = pyodata.Client(SERVICE_URL , requests.Session())
2323
24+ Get the service for async libraries
25+ -----------------------------------
26+
27+ Initialization of the session instance is dependent on particular library,
28+ but also must have API compatible Session _ from Requests _.
29+
30+ .. code-block :: python
31+
32+ import httpx
33+ import aiohttp
34+
35+ SERVICE_URL = ' http://services.odata.org/V2/Northwind/Northwind.svc/'
36+
37+ service_httpx = await pyodata.Client.build_async_client(SERVICE_URL , httpx)
38+ service_aiohttp = await pyodata.Client.build_async_client(SERVICE_URL , aiohttp.ClientSession())
39+
2440 Get the service proxy client for an OData service requiring sap-client parameter
2541--------------------------------------------------------------------------------
2642
You can’t perform that action at this time.
0 commit comments