dub 0.32.0__py3-none-any.whl → 0.34.0__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.
Files changed (70) hide show
  1. dub/_version.py +3 -3
  2. dub/analytics.py +6 -4
  3. dub/basesdk.py +6 -0
  4. dub/commissions.py +12 -8
  5. dub/customers.py +24 -313
  6. dub/domains.py +34 -26
  7. dub/embed_tokens.py +6 -4
  8. dub/events.py +6 -4
  9. dub/folders.py +24 -20
  10. dub/links.py +58 -54
  11. dub/models/components/__init__.py +81 -149
  12. dub/models/components/analyticstopurls.py +2 -2
  13. dub/models/components/leadcreatedevent.py +15 -14
  14. dub/models/components/linkclickedevent.py +19 -18
  15. dub/models/components/linkerrorschema.py +12 -12
  16. dub/models/components/linkschema.py +9 -3
  17. dub/models/components/linktagschema.py +3 -3
  18. dub/models/components/linktagschemaoutput.py +38 -0
  19. dub/models/components/linkwebhookevent.py +15 -16
  20. dub/models/components/partnerapplicationsubmittedevent.py +269 -0
  21. dub/models/components/partnerenrolledevent.py +68 -8
  22. dub/models/components/salecreatedevent.py +15 -14
  23. dub/models/components/webhookevent.py +6 -0
  24. dub/models/components/workspaceschema.py +6 -0
  25. dub/models/operations/__init__.py +147 -57
  26. dub/models/operations/banpartner.py +83 -0
  27. dub/models/operations/createpartner.py +68 -59
  28. dub/models/operations/createpartnerlink.py +0 -51
  29. dub/models/operations/createreferralsembedtoken.py +0 -51
  30. dub/models/operations/getcustomers.py +18 -0
  31. dub/models/operations/getlinkinfo.py +0 -2
  32. dub/models/operations/getlinks.py +2 -2
  33. dub/models/operations/getlinkscount.py +2 -2
  34. dub/models/operations/getqrcode.py +1 -1
  35. dub/models/operations/listcommissions.py +13 -2
  36. dub/models/operations/listdomains.py +1 -1
  37. dub/models/operations/listevents.py +2026 -21
  38. dub/models/operations/listpartners.py +75 -8
  39. dub/models/operations/retrieveanalytics.py +28 -5
  40. dub/models/operations/retrievelinks.py +44 -9
  41. dub/models/operations/retrievepartneranalytics.py +51 -11
  42. dub/models/operations/tracklead.py +4 -4
  43. dub/models/operations/updatecommission.py +7 -2
  44. dub/models/operations/updatecustomer.py +23 -11
  45. dub/models/operations/updatelink.py +0 -2
  46. dub/models/operations/updateworkspace.py +3 -3
  47. dub/models/operations/upsertpartnerlink.py +0 -51
  48. dub/partners.py +316 -24
  49. dub/qr_codes.py +4 -2
  50. dub/tags.py +24 -20
  51. dub/track.py +12 -16
  52. dub/types/basemodel.py +41 -3
  53. dub/utils/__init__.py +0 -3
  54. dub/utils/enums.py +60 -0
  55. dub/utils/forms.py +21 -10
  56. dub/utils/queryparams.py +14 -2
  57. dub/utils/requestbodies.py +3 -3
  58. dub/utils/retries.py +69 -5
  59. dub/utils/serializers.py +0 -20
  60. dub/utils/unmarshal_json_response.py +15 -1
  61. dub/workspaces.py +12 -16
  62. {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/METADATA +15 -33
  63. {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/RECORD +65 -67
  64. dub/models/components/clickevent.py +0 -556
  65. dub/models/components/continentcode.py +0 -16
  66. dub/models/components/leadevent.py +0 -680
  67. dub/models/components/saleevent.py +0 -779
  68. dub/models/operations/createcustomer.py +0 -382
  69. {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/WHEEL +0 -0
  70. {dub-0.32.0.dist-info → dub-0.34.0.dist-info}/licenses/LICENSE +0 -0
dub/utils/retries.py CHANGED
@@ -3,7 +3,9 @@
3
3
  import asyncio
4
4
  import random
5
5
  import time
6
- from typing import List
6
+ from datetime import datetime
7
+ from email.utils import parsedate_to_datetime
8
+ from typing import List, Optional
7
9
 
8
10
  import httpx
9
11
 
@@ -51,9 +53,11 @@ class Retries:
51
53
 
52
54
  class TemporaryError(Exception):
53
55
  response: httpx.Response
56
+ retry_after: Optional[int]
54
57
 
55
58
  def __init__(self, response: httpx.Response):
56
59
  self.response = response
60
+ self.retry_after = _parse_retry_after_header(response)
57
61
 
58
62
 
59
63
  class PermanentError(Exception):
@@ -63,6 +67,62 @@ class PermanentError(Exception):
63
67
  self.inner = inner
64
68
 
65
69
 
70
+ def _parse_retry_after_header(response: httpx.Response) -> Optional[int]:
71
+ """Parse Retry-After header from response.
72
+
73
+ Returns:
74
+ Retry interval in milliseconds, or None if header is missing or invalid.
75
+ """
76
+ retry_after_header = response.headers.get("retry-after")
77
+ if not retry_after_header:
78
+ return None
79
+
80
+ try:
81
+ seconds = float(retry_after_header)
82
+ return round(seconds * 1000)
83
+ except ValueError:
84
+ pass
85
+
86
+ try:
87
+ retry_date = parsedate_to_datetime(retry_after_header)
88
+ delta = (retry_date - datetime.now(retry_date.tzinfo)).total_seconds()
89
+ return round(max(0, delta) * 1000)
90
+ except (ValueError, TypeError):
91
+ pass
92
+
93
+ return None
94
+
95
+
96
+ def _get_sleep_interval(
97
+ exception: Exception,
98
+ initial_interval: int,
99
+ max_interval: int,
100
+ exponent: float,
101
+ retries: int,
102
+ ) -> float:
103
+ """Get sleep interval for retry with exponential backoff.
104
+
105
+ Args:
106
+ exception: The exception that triggered the retry.
107
+ initial_interval: Initial retry interval in milliseconds.
108
+ max_interval: Maximum retry interval in milliseconds.
109
+ exponent: Base for exponential backoff calculation.
110
+ retries: Current retry attempt count.
111
+
112
+ Returns:
113
+ Sleep interval in seconds.
114
+ """
115
+ if (
116
+ isinstance(exception, TemporaryError)
117
+ and exception.retry_after is not None
118
+ and exception.retry_after > 0
119
+ ):
120
+ return exception.retry_after / 1000
121
+
122
+ sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
123
+ return min(sleep, max_interval / 1000)
124
+
125
+
66
126
  def retry(func, retries: Retries):
67
127
  if retries.config.strategy == "backoff":
68
128
 
@@ -183,8 +243,10 @@ def retry_with_backoff(
183
243
  return exception.response
184
244
 
185
245
  raise
186
- sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
187
- sleep = min(sleep, max_interval / 1000)
246
+
247
+ sleep = _get_sleep_interval(
248
+ exception, initial_interval, max_interval, exponent, retries
249
+ )
188
250
  time.sleep(sleep)
189
251
  retries += 1
190
252
 
@@ -211,7 +273,9 @@ async def retry_with_backoff_async(
211
273
  return exception.response
212
274
 
213
275
  raise
214
- sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
215
- sleep = min(sleep, max_interval / 1000)
276
+
277
+ sleep = _get_sleep_interval(
278
+ exception, initial_interval, max_interval, exponent, retries
279
+ )
216
280
  await asyncio.sleep(sleep)
217
281
  retries += 1
dub/utils/serializers.py CHANGED
@@ -102,26 +102,6 @@ def validate_int(b):
102
102
  return int(b)
103
103
 
104
104
 
105
- def validate_open_enum(is_int: bool):
106
- def validate(e):
107
- if e is None:
108
- return None
109
-
110
- if isinstance(e, Unset):
111
- return e
112
-
113
- if is_int:
114
- if not isinstance(e, int):
115
- raise ValueError("Expected int")
116
- else:
117
- if not isinstance(e, str):
118
- raise ValueError("Expected string")
119
-
120
- return e
121
-
122
- return validate
123
-
124
-
125
105
  def validate_const(v):
126
106
  def validate(c):
127
107
  # Optional[T] is a Union[T, None]
@@ -1,12 +1,26 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
- from typing import Any, Optional
3
+ from typing import Any, Optional, Type, TypeVar, overload
4
4
 
5
5
  import httpx
6
6
 
7
7
  from .serializers import unmarshal_json
8
8
  from dub.models import errors
9
9
 
10
+ T = TypeVar("T")
11
+
12
+
13
+ @overload
14
+ def unmarshal_json_response(
15
+ typ: Type[T], http_res: httpx.Response, body: Optional[str] = None
16
+ ) -> T: ...
17
+
18
+
19
+ @overload
20
+ def unmarshal_json_response(
21
+ typ: Any, http_res: httpx.Response, body: Optional[str] = None
22
+ ) -> Any: ...
23
+
10
24
 
11
25
  def unmarshal_json_response(
12
26
  typ: Any, http_res: httpx.Response, body: Optional[str] = None
dub/workspaces.py CHANGED
@@ -20,7 +20,7 @@ class Workspaces(BaseSDK):
20
20
  server_url: Optional[str] = None,
21
21
  timeout_ms: Optional[int] = None,
22
22
  http_headers: Optional[Mapping[str, str]] = None,
23
- ) -> Optional[components.WorkspaceSchema]:
23
+ ) -> components.WorkspaceSchema:
24
24
  r"""Retrieve a workspace
25
25
 
26
26
  Retrieve a workspace for the authenticated user.
@@ -58,6 +58,7 @@ class Workspaces(BaseSDK):
58
58
  accept_header_value="application/json",
59
59
  http_headers=http_headers,
60
60
  security=self.sdk_configuration.security,
61
+ allow_empty_value=None,
61
62
  timeout_ms=timeout_ms,
62
63
  )
63
64
 
@@ -96,9 +97,7 @@ class Workspaces(BaseSDK):
96
97
 
97
98
  response_data: Any = None
98
99
  if utils.match_response(http_res, "200", "application/json"):
99
- return unmarshal_json_response(
100
- Optional[components.WorkspaceSchema], http_res
101
- )
100
+ return unmarshal_json_response(components.WorkspaceSchema, http_res)
102
101
  if utils.match_response(http_res, "400", "application/json"):
103
102
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
104
103
  raise errors.BadRequest(response_data, http_res)
@@ -151,7 +150,7 @@ class Workspaces(BaseSDK):
151
150
  server_url: Optional[str] = None,
152
151
  timeout_ms: Optional[int] = None,
153
152
  http_headers: Optional[Mapping[str, str]] = None,
154
- ) -> Optional[components.WorkspaceSchema]:
153
+ ) -> components.WorkspaceSchema:
155
154
  r"""Retrieve a workspace
156
155
 
157
156
  Retrieve a workspace for the authenticated user.
@@ -189,6 +188,7 @@ class Workspaces(BaseSDK):
189
188
  accept_header_value="application/json",
190
189
  http_headers=http_headers,
191
190
  security=self.sdk_configuration.security,
191
+ allow_empty_value=None,
192
192
  timeout_ms=timeout_ms,
193
193
  )
194
194
 
@@ -227,9 +227,7 @@ class Workspaces(BaseSDK):
227
227
 
228
228
  response_data: Any = None
229
229
  if utils.match_response(http_res, "200", "application/json"):
230
- return unmarshal_json_response(
231
- Optional[components.WorkspaceSchema], http_res
232
- )
230
+ return unmarshal_json_response(components.WorkspaceSchema, http_res)
233
231
  if utils.match_response(http_res, "400", "application/json"):
234
232
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
235
233
  raise errors.BadRequest(response_data, http_res)
@@ -286,7 +284,7 @@ class Workspaces(BaseSDK):
286
284
  server_url: Optional[str] = None,
287
285
  timeout_ms: Optional[int] = None,
288
286
  http_headers: Optional[Mapping[str, str]] = None,
289
- ) -> Optional[components.WorkspaceSchema]:
287
+ ) -> components.WorkspaceSchema:
290
288
  r"""Update a workspace
291
289
 
292
290
  Update a workspace by ID or slug.
@@ -335,6 +333,7 @@ class Workspaces(BaseSDK):
335
333
  "json",
336
334
  Optional[operations.UpdateWorkspaceRequestBody],
337
335
  ),
336
+ allow_empty_value=None,
338
337
  timeout_ms=timeout_ms,
339
338
  )
340
339
 
@@ -373,9 +372,7 @@ class Workspaces(BaseSDK):
373
372
 
374
373
  response_data: Any = None
375
374
  if utils.match_response(http_res, "200", "application/json"):
376
- return unmarshal_json_response(
377
- Optional[components.WorkspaceSchema], http_res
378
- )
375
+ return unmarshal_json_response(components.WorkspaceSchema, http_res)
379
376
  if utils.match_response(http_res, "400", "application/json"):
380
377
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
381
378
  raise errors.BadRequest(response_data, http_res)
@@ -432,7 +429,7 @@ class Workspaces(BaseSDK):
432
429
  server_url: Optional[str] = None,
433
430
  timeout_ms: Optional[int] = None,
434
431
  http_headers: Optional[Mapping[str, str]] = None,
435
- ) -> Optional[components.WorkspaceSchema]:
432
+ ) -> components.WorkspaceSchema:
436
433
  r"""Update a workspace
437
434
 
438
435
  Update a workspace by ID or slug.
@@ -481,6 +478,7 @@ class Workspaces(BaseSDK):
481
478
  "json",
482
479
  Optional[operations.UpdateWorkspaceRequestBody],
483
480
  ),
481
+ allow_empty_value=None,
484
482
  timeout_ms=timeout_ms,
485
483
  )
486
484
 
@@ -519,9 +517,7 @@ class Workspaces(BaseSDK):
519
517
 
520
518
  response_data: Any = None
521
519
  if utils.match_response(http_res, "200", "application/json"):
522
- return unmarshal_json_response(
523
- Optional[components.WorkspaceSchema], http_res
524
- )
520
+ return unmarshal_json_response(components.WorkspaceSchema, http_res)
525
521
  if utils.match_response(http_res, "400", "application/json"):
526
522
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
527
523
  raise errors.BadRequest(response_data, http_res)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dub
3
- Version: 0.32.0
3
+ Version: 0.34.0
4
4
  Summary: Python Client SDK Generated by Speakeasy
5
5
  License-File: LICENSE
6
6
  Author: Speakeasy
@@ -155,8 +155,6 @@ with Dub(
155
155
  ],
156
156
  })
157
157
 
158
- assert res is not None
159
-
160
158
  # Handle response
161
159
  print(res)
162
160
  ```
@@ -194,8 +192,6 @@ async def main():
194
192
  ],
195
193
  })
196
194
 
197
- assert res is not None
198
-
199
195
  # Handle response
200
196
  print(res)
201
197
 
@@ -231,8 +227,6 @@ with Dub(
231
227
  ],
232
228
  })
233
229
 
234
- assert res is not None
235
-
236
230
  # Handle response
237
231
  print(res)
238
232
  ```
@@ -270,8 +264,6 @@ async def main():
270
264
  ],
271
265
  })
272
266
 
273
- assert res is not None
274
-
275
267
  # Handle response
276
268
  print(res)
277
269
 
@@ -285,24 +277,23 @@ asyncio.run(main())
285
277
  <details open>
286
278
  <summary>Available methods</summary>
287
279
 
288
- ### [analytics](https://github.com/dubinc/dub-python/blob/master/docs/sdks/analytics/README.md)
280
+ ### [Analytics](https://github.com/dubinc/dub-python/blob/master/docs/sdks/analytics/README.md)
289
281
 
290
282
  * [retrieve](https://github.com/dubinc/dub-python/blob/master/docs/sdks/analytics/README.md#retrieve) - Retrieve analytics for a link, a domain, or the authenticated workspace.
291
283
 
292
- ### [commissions](https://github.com/dubinc/dub-python/blob/master/docs/sdks/commissions/README.md)
284
+ ### [Commissions](https://github.com/dubinc/dub-python/blob/master/docs/sdks/commissions/README.md)
293
285
 
294
286
  * [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/commissions/README.md#list) - Get commissions for a program.
295
287
  * [update](https://github.com/dubinc/dub-python/blob/master/docs/sdks/commissions/README.md#update) - Update a commission.
296
288
 
297
- ### [customers](https://github.com/dubinc/dub-python/blob/master/docs/sdks/customers/README.md)
289
+ ### [Customers](https://github.com/dubinc/dub-python/blob/master/docs/sdks/customers/README.md)
298
290
 
299
291
  * [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/customers/README.md#list) - Retrieve a list of customers
300
- * [~~create~~](https://github.com/dubinc/dub-python/blob/master/docs/sdks/customers/README.md#create) - Create a customer :warning: **Deprecated**
301
292
  * [get](https://github.com/dubinc/dub-python/blob/master/docs/sdks/customers/README.md#get) - Retrieve a customer
302
293
  * [update](https://github.com/dubinc/dub-python/blob/master/docs/sdks/customers/README.md#update) - Update a customer
303
294
  * [delete](https://github.com/dubinc/dub-python/blob/master/docs/sdks/customers/README.md#delete) - Delete a customer
304
295
 
305
- ### [domains](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md)
296
+ ### [Domains](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md)
306
297
 
307
298
  * [create](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#create) - Create a domain
308
299
  * [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#list) - Retrieve a list of domains
@@ -311,22 +302,22 @@ asyncio.run(main())
311
302
  * [register](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#register) - Register a domain
312
303
  * [check_status](https://github.com/dubinc/dub-python/blob/master/docs/sdks/domains/README.md#check_status) - Check the availability of one or more domains
313
304
 
314
- ### [embed_tokens](https://github.com/dubinc/dub-python/blob/master/docs/sdks/embedtokens/README.md)
305
+ ### [EmbedTokens](https://github.com/dubinc/dub-python/blob/master/docs/sdks/embedtokens/README.md)
315
306
 
316
307
  * [referrals](https://github.com/dubinc/dub-python/blob/master/docs/sdks/embedtokens/README.md#referrals) - Create a referrals embed token
317
308
 
318
- ### [events](https://github.com/dubinc/dub-python/blob/master/docs/sdks/events/README.md)
309
+ ### [Events](https://github.com/dubinc/dub-python/blob/master/docs/sdks/events/README.md)
319
310
 
320
311
  * [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/events/README.md#list) - Retrieve a list of events
321
312
 
322
- ### [folders](https://github.com/dubinc/dub-python/blob/master/docs/sdks/folders/README.md)
313
+ ### [Folders](https://github.com/dubinc/dub-python/blob/master/docs/sdks/folders/README.md)
323
314
 
324
315
  * [create](https://github.com/dubinc/dub-python/blob/master/docs/sdks/folders/README.md#create) - Create a folder
325
316
  * [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/folders/README.md#list) - Retrieve a list of folders
326
317
  * [update](https://github.com/dubinc/dub-python/blob/master/docs/sdks/folders/README.md#update) - Update a folder
327
318
  * [delete](https://github.com/dubinc/dub-python/blob/master/docs/sdks/folders/README.md#delete) - Delete a folder
328
319
 
329
- ### [links](https://github.com/dubinc/dub-python/blob/master/docs/sdks/links/README.md)
320
+ ### [Links](https://github.com/dubinc/dub-python/blob/master/docs/sdks/links/README.md)
330
321
 
331
322
  * [create](https://github.com/dubinc/dub-python/blob/master/docs/sdks/links/README.md#create) - Create a link
332
323
  * [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/links/README.md#list) - Retrieve a list of links
@@ -339,7 +330,7 @@ asyncio.run(main())
339
330
  * [delete_many](https://github.com/dubinc/dub-python/blob/master/docs/sdks/links/README.md#delete_many) - Bulk delete links
340
331
  * [upsert](https://github.com/dubinc/dub-python/blob/master/docs/sdks/links/README.md#upsert) - Upsert a link
341
332
 
342
- ### [partners](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md)
333
+ ### [Partners](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md)
343
334
 
344
335
  * [create](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#create) - Create or update a partner
345
336
  * [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#list) - List all partners
@@ -347,24 +338,25 @@ asyncio.run(main())
347
338
  * [retrieve_links](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#retrieve_links) - Retrieve a partner's links.
348
339
  * [upsert_link](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#upsert_link) - Upsert a link for a partner
349
340
  * [analytics](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#analytics) - Retrieve analytics for a partner
341
+ * [ban](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#ban) - Ban a partner
350
342
 
351
- ### [qr_codes](https://github.com/dubinc/dub-python/blob/master/docs/sdks/qrcodes/README.md)
343
+ ### [QRCodes](https://github.com/dubinc/dub-python/blob/master/docs/sdks/qrcodes/README.md)
352
344
 
353
345
  * [get](https://github.com/dubinc/dub-python/blob/master/docs/sdks/qrcodes/README.md#get) - Retrieve a QR code
354
346
 
355
- ### [tags](https://github.com/dubinc/dub-python/blob/master/docs/sdks/tags/README.md)
347
+ ### [Tags](https://github.com/dubinc/dub-python/blob/master/docs/sdks/tags/README.md)
356
348
 
357
349
  * [create](https://github.com/dubinc/dub-python/blob/master/docs/sdks/tags/README.md#create) - Create a tag
358
350
  * [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/tags/README.md#list) - Retrieve a list of tags
359
351
  * [update](https://github.com/dubinc/dub-python/blob/master/docs/sdks/tags/README.md#update) - Update a tag
360
352
  * [delete](https://github.com/dubinc/dub-python/blob/master/docs/sdks/tags/README.md#delete) - Delete a tag
361
353
 
362
- ### [track](https://github.com/dubinc/dub-python/blob/master/docs/sdks/track/README.md)
354
+ ### [Track](https://github.com/dubinc/dub-python/blob/master/docs/sdks/track/README.md)
363
355
 
364
356
  * [lead](https://github.com/dubinc/dub-python/blob/master/docs/sdks/track/README.md#lead) - Track a lead
365
357
  * [sale](https://github.com/dubinc/dub-python/blob/master/docs/sdks/track/README.md#sale) - Track a sale
366
358
 
367
- ### [workspaces](https://github.com/dubinc/dub-python/blob/master/docs/sdks/workspaces/README.md)
359
+ ### [Workspaces](https://github.com/dubinc/dub-python/blob/master/docs/sdks/workspaces/README.md)
368
360
 
369
361
  * [get](https://github.com/dubinc/dub-python/blob/master/docs/sdks/workspaces/README.md#get) - Retrieve a workspace
370
362
  * [update](https://github.com/dubinc/dub-python/blob/master/docs/sdks/workspaces/README.md#update) - Update a workspace
@@ -416,8 +408,6 @@ with Dub(
416
408
  ],
417
409
  })
418
410
 
419
- assert res is not None
420
-
421
411
  # Handle response
422
412
  print(res)
423
413
 
@@ -497,8 +487,6 @@ with Dub(
497
487
  ],
498
488
  })
499
489
 
500
- assert res is not None
501
-
502
490
  # Handle response
503
491
  print(res)
504
492
 
@@ -624,8 +612,6 @@ with Dub(
624
612
  ],
625
613
  })
626
614
 
627
- assert res is not None
628
-
629
615
  # Handle response
630
616
  print(res)
631
617
 
@@ -666,8 +652,6 @@ with Dub(
666
652
  },
667
653
  RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
668
654
 
669
- assert res is not None
670
-
671
655
  # Handle response
672
656
  print(res)
673
657
 
@@ -702,8 +686,6 @@ with Dub(
702
686
  ],
703
687
  })
704
688
 
705
- assert res is not None
706
-
707
689
  # Handle response
708
690
  print(res)
709
691