udl-sdk 0.1.0a2__py3-none-any.whl → 0.1.0a3__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.
- {udl_sdk-0.1.0a2.dist-info → udl_sdk-0.1.0a3.dist-info}/METADATA +10 -26
- {udl_sdk-0.1.0a2.dist-info → udl_sdk-0.1.0a3.dist-info}/RECORD +5 -5
- unifieddatalibrary/_version.py +1 -1
- {udl_sdk-0.1.0a2.dist-info → udl_sdk-0.1.0a3.dist-info}/WHEEL +0 -0
- {udl_sdk-0.1.0a2.dist-info → udl_sdk-0.1.0a3.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: udl-sdk
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.0a3
|
4
4
|
Summary: The official Python library for the unifieddatalibrary API
|
5
5
|
Project-URL: Homepage, https://github.com/rsivilli-bluestaq/udl-python-sdk
|
6
6
|
Project-URL: Repository, https://github.com/rsivilli-bluestaq/udl-python-sdk
|
@@ -63,10 +63,7 @@ client = Unifieddatalibrary(
|
|
63
63
|
password=os.environ.get("UDL_AUTH_PASSWORD"), # This is the default and can be omitted
|
64
64
|
)
|
65
65
|
|
66
|
-
|
67
|
-
"id",
|
68
|
-
)
|
69
|
-
print(conjunction_full.id)
|
66
|
+
elset_abridgeds = client.elsets.current.list()
|
70
67
|
```
|
71
68
|
|
72
69
|
While you can provide a `username` keyword argument,
|
@@ -90,10 +87,7 @@ client = AsyncUnifieddatalibrary(
|
|
90
87
|
|
91
88
|
|
92
89
|
async def main() -> None:
|
93
|
-
|
94
|
-
"id",
|
95
|
-
)
|
96
|
-
print(conjunction_full.id)
|
90
|
+
elset_abridgeds = await client.elsets.current.list()
|
97
91
|
|
98
92
|
|
99
93
|
asyncio.run(main())
|
@@ -210,9 +204,7 @@ from unifieddatalibrary import Unifieddatalibrary
|
|
210
204
|
client = Unifieddatalibrary()
|
211
205
|
|
212
206
|
try:
|
213
|
-
client.
|
214
|
-
"id",
|
215
|
-
)
|
207
|
+
client.elsets.current.list()
|
216
208
|
except unifieddatalibrary.APIConnectionError as e:
|
217
209
|
print("The server could not be reached")
|
218
210
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
@@ -255,9 +247,7 @@ client = Unifieddatalibrary(
|
|
255
247
|
)
|
256
248
|
|
257
249
|
# Or, configure per-request:
|
258
|
-
client.with_options(max_retries=5).
|
259
|
-
"id",
|
260
|
-
)
|
250
|
+
client.with_options(max_retries=5).elsets.current.list()
|
261
251
|
```
|
262
252
|
|
263
253
|
### Timeouts
|
@@ -280,9 +270,7 @@ client = Unifieddatalibrary(
|
|
280
270
|
)
|
281
271
|
|
282
272
|
# Override per-request:
|
283
|
-
client.with_options(timeout=5.0).
|
284
|
-
"id",
|
285
|
-
)
|
273
|
+
client.with_options(timeout=5.0).elsets.current.list()
|
286
274
|
```
|
287
275
|
|
288
276
|
On timeout, an `APITimeoutError` is thrown.
|
@@ -323,13 +311,11 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
323
311
|
from unifieddatalibrary import Unifieddatalibrary
|
324
312
|
|
325
313
|
client = Unifieddatalibrary()
|
326
|
-
response = client.
|
327
|
-
"id",
|
328
|
-
)
|
314
|
+
response = client.elsets.current.with_raw_response.list()
|
329
315
|
print(response.headers.get('X-My-Header'))
|
330
316
|
|
331
|
-
|
332
|
-
print(
|
317
|
+
current = response.parse() # get the object that `elsets.current.list()` would have returned
|
318
|
+
print(current)
|
333
319
|
```
|
334
320
|
|
335
321
|
These methods return an [`APIResponse`](https://github.com/rsivilli-bluestaq/udl-python-sdk/tree/main/src/unifieddatalibrary/_response.py) object.
|
@@ -343,9 +329,7 @@ The above interface eagerly reads the full response body when you make the reque
|
|
343
329
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
344
330
|
|
345
331
|
```python
|
346
|
-
with client.
|
347
|
-
"id",
|
348
|
-
) as response:
|
332
|
+
with client.elsets.current.with_streaming_response.list() as response:
|
349
333
|
print(response.headers.get("X-My-Header"))
|
350
334
|
|
351
335
|
for line in response.iter_lines():
|
@@ -11,7 +11,7 @@ unifieddatalibrary/_resource.py,sha256=Ik-pULzkvFIY2OgB9Ra7mIQKCle38FSP36dWWCH9v
|
|
11
11
|
unifieddatalibrary/_response.py,sha256=YC3eakjvtnXRvOmvlEI5lbbqAm-dmiw8IjCchqMZB3A,28891
|
12
12
|
unifieddatalibrary/_streaming.py,sha256=LwKrocz7ZRmYd47TA3q-PLXwgdTgjANE-TCIRZB958s,10148
|
13
13
|
unifieddatalibrary/_types.py,sha256=Ig7yl6V3WuOW7nf5r9vmMDvds0bSTpM5nCI-OnuurP8,6155
|
14
|
-
unifieddatalibrary/_version.py,sha256=
|
14
|
+
unifieddatalibrary/_version.py,sha256=rm_wyHvpOrrRvHU6HlfeblvtGDGYJSqoKquprii-U08,178
|
15
15
|
unifieddatalibrary/pagination.py,sha256=_pVGwN4smUYQCUm2N_26lmP5aSYxcf5_wPU95-Y6egg,2385
|
16
16
|
unifieddatalibrary/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
unifieddatalibrary/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
@@ -2283,7 +2283,7 @@ unifieddatalibrary/types/weatherreport/history_count_response.py,sha256=ZAHTF5Io
|
|
2283
2283
|
unifieddatalibrary/types/weatherreport/history_list_params.py,sha256=_Zc3k4XnZx0uJjuY28oo4l1bbH7LNhVyLyD3oIPfuVo,883
|
2284
2284
|
unifieddatalibrary/types/weatherreport/history_list_response.py,sha256=aYoLUa35ixkutE0S6Wd0pwhsLzF-dXrOk6Y3pAOBwG0,296
|
2285
2285
|
unifieddatalibrary/types/weatherreport/weather_report_full.py,sha256=iv7fHg9aQh6ztvl0ztve5Z3_8Ww-efPMBgrS0n5gXvM,20751
|
2286
|
-
udl_sdk-0.1.
|
2287
|
-
udl_sdk-0.1.
|
2288
|
-
udl_sdk-0.1.
|
2289
|
-
udl_sdk-0.1.
|
2286
|
+
udl_sdk-0.1.0a3.dist-info/METADATA,sha256=-yj0Yt8TYLvYH_Dp0pgoMNHLS4bMd6DulpNEECG2Bxc,15982
|
2287
|
+
udl_sdk-0.1.0a3.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
2288
|
+
udl_sdk-0.1.0a3.dist-info/licenses/LICENSE,sha256=YBMC8KbJHXtxIo1-d_G5WdWjtiwFyrcZ5jAsRwN4POI,11348
|
2289
|
+
udl_sdk-0.1.0a3.dist-info/RECORD,,
|
unifieddatalibrary/_version.py
CHANGED
File without changes
|
File without changes
|