pyEscoAPI 0.0.31__tar.gz → 0.0.33__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyEscoAPI
3
- Version: 0.0.31
3
+ Version: 0.0.33
4
4
  Summary: Python client for Esco API (Esco bolsa)
5
5
  Author-email: Codetria <hola@codetria.com>
6
6
  License: MIT License
@@ -64,7 +64,7 @@ class EscoAPI:
64
64
  "json": request_body,
65
65
  "headers": headers
66
66
  }
67
- result: Response = req_call(**params)
67
+ result: Response = req_call(**params, timeout=self.timeout)
68
68
  if 200 <= result.status_code <= 299:
69
69
  result_body = result.json()
70
70
  logger.info("EscoAPI: Successful response", extra={
@@ -125,7 +125,8 @@ class EscoAPI:
125
125
  username: str,
126
126
  password: str,
127
127
  client_id: str = "",
128
- version: APIVersion = APIVersion.VERSION_9
128
+ version: APIVersion = APIVersion.VERSION_9,
129
+ timeout: int = 10
129
130
  ):
130
131
  """
131
132
  Initializes the EscoAPI client, starting a login to the platform.
@@ -143,6 +144,7 @@ class EscoAPI:
143
144
  self.password = password
144
145
  self.client_id = client_id
145
146
  self.version = version
147
+ self.timeout = timeout
146
148
 
147
149
  self.__esco_login()
148
150
  self._initialized = True
@@ -1898,7 +1900,7 @@ class EscoAPI:
1898
1900
  self.__pre_connection()
1899
1901
  return self.__make_request(
1900
1902
  request_endpoint=f"/insert-cuenta-comitente",
1901
- request_body=asdict(comitente_data),
1903
+ request_body=asdict(comitente_data, dict_factory=lambda x: {k: v for k, v in x if v is not None}),
1902
1904
  request_method=HTTPMethod.POST
1903
1905
  )
1904
1906
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyEscoAPI
3
- Version: 0.0.31
3
+ Version: 0.0.33
4
4
  Summary: Python client for Esco API (Esco bolsa)
5
5
  Author-email: Codetria <hola@codetria.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = 'pyEscoAPI'
7
- version = "0.0.31"
7
+ version = "0.0.33"
8
8
  license = {text = "MIT License"}
9
9
  authors = [
10
10
  { name="Codetria", email="hola@codetria.com" },
File without changes
File without changes