Skip to content

Commit 1c9a5ec

Browse files
Sync monorepo state at "prototype for python SDK change" (#115)
Syncing from userclouds/userclouds@c59b28a6382ae1e00885a3a33e1e7dc317159944
1 parent 7b1319a commit 1c9a5ec

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.9.2 - 06-05-2024
4+
5+
- Fix missing parameter in \_post_async for AsyncClient
6+
37
## 1.9.1 - 05-08-2024
48

59
- Fix bad token expiration check

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66

77
[project]
88
name = "usercloudssdk"
9-
version = "1.9.1"
9+
version = "1.9.2"
1010
description = "Python SDK for UserClouds"
1111
authors = [{ name = "UserClouds", email = "[email protected]" }]
1212
classifiers = [

src/usercloudssdk/asyncclient.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,10 +1324,15 @@ async def _get_async(self, url, params: dict[str, str | int] | None = None) -> d
13241324
return ucjson.loads(resp.text)
13251325

13261326
async def _post_async(
1327-
self, url, json_data: dict | str | None = None
1327+
self,
1328+
url,
1329+
json_data: dict | str | None = None,
1330+
params: dict[str, str | int] | None = None,
13281331
) -> dict | list:
13291332
headers, content = await self._prep_json_data_async(json_data)
1330-
resp = await self._client.post_async(url, headers=headers, content=content)
1333+
resp = await self._client.post_async(
1334+
url, params=params, headers=headers, content=content
1335+
)
13311336
if resp.status_code >= 400:
13321337
raise UserCloudsSDKError.from_response(resp)
13331338
return ucjson.loads(resp.text)

tools/genasyncclient.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,13 @@ async def _get_async(self, url, params: dict[str, str | int] | None = None) -> d
151151
return ucjson.loads(resp.text)
152152
153153
async def _post_async(
154-
self, url, json_data: dict | str | None = None
154+
self,
155+
url,
156+
json_data: dict | str | None = None,
157+
params: dict[str, str | int] | None = None,
155158
) -> dict | list:
156159
headers, content = await self._prep_json_data_async(json_data)
157-
resp = await self._client.post_async(url, headers=headers, content=content)
160+
resp = await self._client.post_async(url, params=params, headers=headers, content=content)
158161
if resp.status_code >= 400:
159162
raise UserCloudsSDKError.from_response(resp)
160163
return ucjson.loads(resp.text)

0 commit comments

Comments
 (0)