xn-client 0.0.3.dev2__tar.gz → 0.0.3.dev3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/.pre-commit-config.yaml +1 -0
- {xn_client-0.0.3.dev2/xn_client.egg-info → xn_client-0.0.3.dev3}/PKG-INFO +1 -1
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/pyproject.toml +3 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/x_client/aiohttp.py +10 -6
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3/xn_client.egg-info}/PKG-INFO +1 -1
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/.gitignore +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/README.md +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/makefile +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/setup.cfg +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/tests/__init__.py +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/tests/test_request.py +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/x_client/__init__.py +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/x_client/http.py +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/xn_client.egg-info/SOURCES.txt +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/xn_client.egg-info/dependency_links.txt +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/xn_client.egg-info/requires.txt +0 -0
- {xn_client-0.0.3.dev2 → xn_client-0.0.3.dev3}/xn_client.egg-info/top_level.txt +0 -0
|
@@ -35,6 +35,9 @@ local_scheme = "no-local-version"
|
|
|
35
35
|
[tool.ruff]
|
|
36
36
|
line-length = 120
|
|
37
37
|
|
|
38
|
+
[tool.ruff.format]
|
|
39
|
+
preview = true
|
|
40
|
+
|
|
38
41
|
[tool.pytest.ini_options]
|
|
39
42
|
asyncio_mode = "auto"
|
|
40
43
|
asyncio_default_fixture_loop_scope = "module" # , "session", "class", "package", "function"
|
|
@@ -17,17 +17,21 @@ class Client:
|
|
|
17
17
|
async def close(self):
|
|
18
18
|
await self.session.close()
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
# noinspection PyMethodMayBeStatic
|
|
21
|
+
def _prehook(self, _payload: dict = None):
|
|
22
|
+
return {}
|
|
23
|
+
|
|
24
|
+
async def _get(self, url: str, params: dict = None):
|
|
25
|
+
resp: ClientResponse = await self.session.get(url, params=params, headers=self._prehook(params))
|
|
22
26
|
return await self._proc(resp)
|
|
23
27
|
|
|
24
|
-
async def _post(self, url: str, data: dict = None
|
|
28
|
+
async def _post(self, url: str, data: dict = None):
|
|
25
29
|
dt = {"json" if isinstance(data, dict) else "data": data}
|
|
26
|
-
resp = await self.session.post(url, **dt,
|
|
30
|
+
resp = await self.session.post(url, **dt, headers=self._prehook(data))
|
|
27
31
|
return await self._proc(resp)
|
|
28
32
|
|
|
29
|
-
async def _delete(self, url: str, params: dict = None
|
|
30
|
-
resp: ClientResponse = await self.session.delete(url, params=params,
|
|
33
|
+
async def _delete(self, url: str, params: dict = None):
|
|
34
|
+
resp: ClientResponse = await self.session.delete(url, params=params, headers=self._prehook(params))
|
|
31
35
|
return await self._proc(resp)
|
|
32
36
|
|
|
33
37
|
async def _proc(self, resp: ClientResponse, data=None) -> dict | str:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|