finalsa-common-http-client 0.1.2__py3-none-any.whl → 0.1.3__py3-none-any.whl

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.
finalsa/http/_shared.py CHANGED
@@ -77,9 +77,9 @@ def parse_params(params: Mapping[str, Any] | None ) -> dict[str, str | int | flo
77
77
  if value is not None:
78
78
  result[key] = value
79
79
  if isinstance(value, dict):
80
- result[key] = dumps(value)
80
+ result[key] = dumps(value).decode('utf-8')
81
81
  if isinstance(value, list):
82
- result[key] = dumps(value)
82
+ result[key] = dumps(value).decode('utf-8')
83
83
  return result
84
84
 
85
85
 
@@ -180,7 +180,11 @@ class BaseAsyncHttpClient:
180
180
  return self._session
181
181
 
182
182
  async def get_paginated(self, path: str, pagination_request: PaginationRequest, response_model: Type[BaseModel], **kwargs: Any) -> PaginationResponse[Type[BaseModel]]:
183
- response = await self.get(path, params=pagination_request.model_dump(), **kwargs)
183
+ pagination_request_dict = pagination_request.model_dump()
184
+ if 'exclusive_start_key' in pagination_request_dict:
185
+ pagination_request_dict['from'] = pagination_request_dict['exclusive_start_key']
186
+ pagination_request_dict.pop('exclusive_start_key')
187
+ response = await self.get(path, params=pagination_request_dict, **kwargs)
184
188
  data = await response.json()
185
189
  items = [response_model.model_validate_json(
186
190
  item) for item in data["items"]]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: finalsa-common-http-client
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: HTTP client library for common data types used in business applications
5
5
  Project-URL: Homepage, https://github.com/finalsa/finalsa-http-client
6
6
  Project-URL: Documentation, https://github.com/finalsa/finalsa-http-client#readme
@@ -0,0 +1,10 @@
1
+ finalsa/http/__init__.py,sha256=w6M9CRcx2gCy1u-HLhLZ_0kQX92JEbFiGi4MBYqR3OI,498
2
+ finalsa/http/_shared.py,sha256=lIUwPSg3uZY9viTJ_KDbhHLQGw8PiQGtINFGJekJkWc,5278
3
+ finalsa/http/async_client/__init__.py,sha256=L25WfVpUpPZlMv6-cgeWlNvmK5UJOhLZ1NOndcIsA9w,73
4
+ finalsa/http/async_client/base.py,sha256=XPgv3Ux3L9HZ166b6g2f7tbe5pnuBl5hKfOpX6TEBjU,7812
5
+ finalsa/http/sync_client/__init__.py,sha256=ocLE6dofwYCD9_rJpIP1KhlIujRFcaJfhoaeXVrSCVE,59
6
+ finalsa/http/sync_client/base.py,sha256=uH9CNAkg-Lyjoj_kx7mTEotcivYq7fQpHcWxWWM_Pro,6624
7
+ finalsa_common_http_client-0.1.3.dist-info/METADATA,sha256=2hYnkJQ3fnIcaOEgW1xJzn-xy5Qyuf6lqm_poMLYigA,9102
8
+ finalsa_common_http_client-0.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
9
+ finalsa_common_http_client-0.1.3.dist-info/licenses/LICENSE.md,sha256=yqzhfnTBr2S4lUBx-yibVPOIXRUDPrSUN9-_7AsC6OU,1084
10
+ finalsa_common_http_client-0.1.3.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- finalsa/http/__init__.py,sha256=w6M9CRcx2gCy1u-HLhLZ_0kQX92JEbFiGi4MBYqR3OI,498
2
- finalsa/http/_shared.py,sha256=N3lH8m7hCHLTRCDASi2U8-TCweuEIfKQDVtMQgX_j38,5246
3
- finalsa/http/async_client/__init__.py,sha256=L25WfVpUpPZlMv6-cgeWlNvmK5UJOhLZ1NOndcIsA9w,73
4
- finalsa/http/async_client/base.py,sha256=ZMa-h_5Ay2WxwFWyXESHBxg6waHVsumLdkJnuc1l1JE,7537
5
- finalsa/http/sync_client/__init__.py,sha256=ocLE6dofwYCD9_rJpIP1KhlIujRFcaJfhoaeXVrSCVE,59
6
- finalsa/http/sync_client/base.py,sha256=uH9CNAkg-Lyjoj_kx7mTEotcivYq7fQpHcWxWWM_Pro,6624
7
- finalsa_common_http_client-0.1.2.dist-info/METADATA,sha256=hnYJkPqFeWs1gPq5CGbx_A13DBEwJE4V0mDR7vphBnw,9102
8
- finalsa_common_http_client-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
9
- finalsa_common_http_client-0.1.2.dist-info/licenses/LICENSE.md,sha256=yqzhfnTBr2S4lUBx-yibVPOIXRUDPrSUN9-_7AsC6OU,1084
10
- finalsa_common_http_client-0.1.2.dist-info/RECORD,,