sws-api-client 1.3.2__tar.gz → 1.4.4__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,14 +1,18 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: sws_api_client
3
- Version: 1.3.2
3
+ Version: 1.4.4
4
4
  Summary:
5
5
  Author: Matteo
6
6
  Author-email: matteo.terrinoni@fao.org
7
- Requires-Python: >=3.12,<4.0
7
+ Requires-Python: >=3.9,<4.0
8
8
  Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.9
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
9
12
  Classifier: Programming Language :: Python :: 3.12
10
13
  Classifier: Programming Language :: Python :: 3.13
11
14
  Requires-Dist: boto3 (>=1.35.66,<2.0.0)
15
+ Requires-Dist: numpy (==2.0.2)
12
16
  Requires-Dist: pandas (>=2.2.3,<3.0.0)
13
17
  Requires-Dist: pydantic (>=2.7.4,<3.0.0)
14
18
  Requires-Dist: python-dotenv (>=0.19.0,<0.20.0)
@@ -1,17 +1,18 @@
1
1
  [tool.poetry]
2
2
  name = "sws_api_client"
3
- version = "1.3.2"
3
+ version = "1.4.4"
4
4
  description = ""
5
5
  authors = ["Matteo <matteo.terrinoni@fao.org>", "Daniele <daniele.mansillo@fao.org>"]
6
6
  readme = "README.md"
7
7
 
8
8
  [tool.poetry.dependencies]
9
- python = "^3.12"
9
+ python = "^3.9"
10
10
  requests = "^2.31.0"
11
11
  pydantic = "^2.7.4"
12
12
  python-dotenv = "^0.19.0"
13
13
  boto3 = "^1.35.66"
14
14
  pandas = "^2.2.3"
15
+ numpy = "2.0.2"
15
16
 
16
17
  [tool.poetry.group.dev.dependencies]
17
18
  python-semantic-release = "^9.8.8"
@@ -6,6 +6,8 @@ various SWS API endpoints through dynamic endpoint discovery.
6
6
 
7
7
  import logging
8
8
  import os
9
+ from typing import Union
10
+
9
11
  import requests
10
12
 
11
13
  from sws_api_client.token import Token
@@ -108,7 +110,7 @@ class Discover:
108
110
  return {}
109
111
 
110
112
  def get(self, endpoint, path: str, params: dict = None, headers: dict = None,
111
- options:dict = None, **kwargs) -> dict|requests.Response:
113
+ options:dict = None, **kwargs) -> Union[dict,requests.Response]:
112
114
  """Make a GET request to an endpoint.
113
115
 
114
116
  Args:
@@ -125,7 +127,7 @@ class Discover:
125
127
  return self.call("GET", endpoint, path, params=params, headers=headers, options=options, **kwargs)
126
128
 
127
129
  def multipartpost(self, endpoint, path: str, data: dict = None, params: dict = None,
128
- headers: dict = None, files = None, options:dict = None, **kwargs) -> dict|requests.Response:
130
+ headers: dict = None, files = None, options:dict = None, **kwargs) -> Union[dict,requests.Response]:
129
131
  """Make a multipart POST request for file uploads.
130
132
 
131
133
  Args:
@@ -144,7 +146,7 @@ class Discover:
144
146
  return self.call("POST", endpoint, path, params=params, headers=headers, data=data, files=files, options=options, **kwargs)
145
147
 
146
148
  def post(self, endpoint, path: str, data: dict = None, params: dict = None,
147
- headers: dict = None, files = None, options:dict = None, **kwargs) -> dict|requests.Response:
149
+ headers: dict = None, files = None, options:dict = None, **kwargs) -> Union[dict,requests.Response]:
148
150
  """Make a POST request with JSON payload.
149
151
 
150
152
  Args:
@@ -166,7 +168,7 @@ class Discover:
166
168
  return self.call("POST", endpoint, path, params=params, headers=headers, data=data, files=files, options=full_options, **kwargs)
167
169
 
168
170
  def put(self, endpoint, path: str, data: dict = None, params: dict = None,
169
- headers: dict = None, options:dict = None, **kwargs) -> dict|requests.Response:
171
+ headers: dict = None, options:dict = None, **kwargs) -> Union[dict,requests.Response]:
170
172
  """Make a PUT request to an endpoint.
171
173
 
172
174
  Args:
@@ -184,7 +186,7 @@ class Discover:
184
186
  return self.call("PUT", endpoint, path, params=params, headers=headers, data=data, options=options, **kwargs)
185
187
 
186
188
  def delete(self, endpoint, path: str, params: dict = None, headers: dict = None,
187
- options:dict = None, **kwargs) -> dict|requests.Response:
189
+ options:dict = None, **kwargs) -> Union[dict,requests.Response]:
188
190
  """Make a DELETE request to an endpoint.
189
191
 
190
192
  Args:
File without changes
File without changes