contextbase-base-client 0.5.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 (79) hide show
  1. base_client/.fern/metadata.json +13 -0
  2. base_client/CONTRIBUTING.md +125 -0
  3. base_client/README.md +176 -0
  4. base_client/__init__.py +159 -0
  5. base_client/_default_clients.py +30 -0
  6. base_client/bases/__init__.py +34 -0
  7. base_client/bases/client.py +256 -0
  8. base_client/bases/raw_client.py +365 -0
  9. base_client/bases/types/__init__.py +34 -0
  10. base_client/bases/types/list_bases_response.py +20 -0
  11. base_client/binding_plan/__init__.py +4 -0
  12. base_client/binding_plan/client.py +108 -0
  13. base_client/binding_plan/raw_client.py +128 -0
  14. base_client/bindings/__init__.py +34 -0
  15. base_client/bindings/client.py +242 -0
  16. base_client/bindings/raw_client.py +326 -0
  17. base_client/bindings/types/__init__.py +34 -0
  18. base_client/bindings/types/list_bindings_response.py +20 -0
  19. base_client/client.py +252 -0
  20. base_client/core/__init__.py +127 -0
  21. base_client/core/api_error.py +23 -0
  22. base_client/core/client_wrapper.py +102 -0
  23. base_client/core/datetime_utils.py +70 -0
  24. base_client/core/file.py +67 -0
  25. base_client/core/force_multipart.py +18 -0
  26. base_client/core/http_client.py +839 -0
  27. base_client/core/http_response.py +59 -0
  28. base_client/core/http_sse/__init__.py +42 -0
  29. base_client/core/http_sse/_api.py +170 -0
  30. base_client/core/http_sse/_decoders.py +61 -0
  31. base_client/core/http_sse/_exceptions.py +7 -0
  32. base_client/core/http_sse/_models.py +17 -0
  33. base_client/core/jsonable_encoder.py +120 -0
  34. base_client/core/logging.py +107 -0
  35. base_client/core/parse_error.py +36 -0
  36. base_client/core/pydantic_utilities.py +508 -0
  37. base_client/core/query_encoder.py +58 -0
  38. base_client/core/remove_none_from_dict.py +11 -0
  39. base_client/core/request_options.py +35 -0
  40. base_client/core/serialization.py +347 -0
  41. base_client/dsn/__init__.py +4 -0
  42. base_client/dsn/client.py +104 -0
  43. base_client/dsn/raw_client.py +128 -0
  44. base_client/errors/__init__.py +38 -0
  45. base_client/errors/bad_request_error.py +11 -0
  46. base_client/errors/forbidden_error.py +11 -0
  47. base_client/reference.md +591 -0
  48. base_client/sync_state/__init__.py +34 -0
  49. base_client/sync_state/client.py +206 -0
  50. base_client/sync_state/raw_client.py +280 -0
  51. base_client/sync_state/types/__init__.py +34 -0
  52. base_client/sync_state/types/sync_state_input_bindings_value.py +23 -0
  53. base_client/tests/conftest.py +21 -0
  54. base_client/tests/test_aiohttp_autodetect.py +113 -0
  55. base_client/types/__init__.py +126 -0
  56. base_client/types/api_key_auth.py +19 -0
  57. base_client/types/authenticated_account_ref.py +20 -0
  58. base_client/types/base.py +23 -0
  59. base_client/types/binding.py +29 -0
  60. base_client/types/binding_auth.py +72 -0
  61. base_client/types/binding_auth_input.py +77 -0
  62. base_client/types/binding_auth_input_api_key.py +19 -0
  63. base_client/types/binding_auth_input_authenticated_account.py +20 -0
  64. base_client/types/binding_auth_input_client_credentials.py +20 -0
  65. base_client/types/binding_auth_input_none.py +17 -0
  66. base_client/types/binding_auth_none.py +17 -0
  67. base_client/types/binding_models.py +23 -0
  68. base_client/types/binding_state.py +24 -0
  69. base_client/types/binding_state_response.py +21 -0
  70. base_client/types/client_credentials_auth.py +20 -0
  71. base_client/types/dagster_all_plan_binding.py +27 -0
  72. base_client/types/dagster_all_plan_binding_mode.py +5 -0
  73. base_client/types/dagster_binding_plan_all.py +23 -0
  74. base_client/types/dsn_response.py +19 -0
  75. base_client/types/error.py +19 -0
  76. base_client/types/run_status.py +10 -0
  77. contextbase_base_client-0.5.0.dist-info/METADATA +10 -0
  78. contextbase_base_client-0.5.0.dist-info/RECORD +79 -0
  79. contextbase_base_client-0.5.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,591 @@
1
+ # Reference
2
+ ## Bases
3
+ <details><summary><code>client.bases.<a href="src/base_client/bases/client.py">list_bases</a>() -> ListBasesResponse</code></summary>
4
+ <dl>
5
+ <dd>
6
+
7
+ #### 🔌 Usage
8
+
9
+ <dl>
10
+ <dd>
11
+
12
+ <dl>
13
+ <dd>
14
+
15
+ ```python
16
+ from base_client import BaseAPIClient
17
+
18
+ client = BaseAPIClient(
19
+ base_url="https://yourhost.com/path/to/api",
20
+ )
21
+
22
+ client.bases.list_bases()
23
+
24
+ ```
25
+ </dd>
26
+ </dl>
27
+ </dd>
28
+ </dl>
29
+
30
+ #### ⚙️ Parameters
31
+
32
+ <dl>
33
+ <dd>
34
+
35
+ <dl>
36
+ <dd>
37
+
38
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
39
+
40
+ </dd>
41
+ </dl>
42
+ </dd>
43
+ </dl>
44
+
45
+
46
+ </dd>
47
+ </dl>
48
+ </details>
49
+
50
+ <details><summary><code>client.bases.<a href="src/base_client/bases/client.py">create_base</a>(...) -> Base</code></summary>
51
+ <dl>
52
+ <dd>
53
+
54
+ #### 🔌 Usage
55
+
56
+ <dl>
57
+ <dd>
58
+
59
+ <dl>
60
+ <dd>
61
+
62
+ ```python
63
+ from base_client import BaseAPIClient
64
+
65
+ client = BaseAPIClient(
66
+ base_url="https://yourhost.com/path/to/api",
67
+ )
68
+
69
+ client.bases.create_base(
70
+ dsn_secret="dsn_secret",
71
+ name="name",
72
+ )
73
+
74
+ ```
75
+ </dd>
76
+ </dl>
77
+ </dd>
78
+ </dl>
79
+
80
+ #### ⚙️ Parameters
81
+
82
+ <dl>
83
+ <dd>
84
+
85
+ <dl>
86
+ <dd>
87
+
88
+ **dsn_secret:** `str`
89
+
90
+ </dd>
91
+ </dl>
92
+
93
+ <dl>
94
+ <dd>
95
+
96
+ **name:** `str`
97
+
98
+ </dd>
99
+ </dl>
100
+
101
+ <dl>
102
+ <dd>
103
+
104
+ **owner_user_id:** `typing.Optional[str]`
105
+
106
+ </dd>
107
+ </dl>
108
+
109
+ <dl>
110
+ <dd>
111
+
112
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
113
+
114
+ </dd>
115
+ </dl>
116
+ </dd>
117
+ </dl>
118
+
119
+
120
+ </dd>
121
+ </dl>
122
+ </details>
123
+
124
+ <details><summary><code>client.bases.<a href="src/base_client/bases/client.py">get_base</a>(...) -> Base</code></summary>
125
+ <dl>
126
+ <dd>
127
+
128
+ #### 🔌 Usage
129
+
130
+ <dl>
131
+ <dd>
132
+
133
+ <dl>
134
+ <dd>
135
+
136
+ ```python
137
+ from base_client import BaseAPIClient
138
+
139
+ client = BaseAPIClient(
140
+ base_url="https://yourhost.com/path/to/api",
141
+ )
142
+
143
+ client.bases.get_base(
144
+ base_id="base_id",
145
+ )
146
+
147
+ ```
148
+ </dd>
149
+ </dl>
150
+ </dd>
151
+ </dl>
152
+
153
+ #### ⚙️ Parameters
154
+
155
+ <dl>
156
+ <dd>
157
+
158
+ <dl>
159
+ <dd>
160
+
161
+ **base_id:** `str`
162
+
163
+ </dd>
164
+ </dl>
165
+
166
+ <dl>
167
+ <dd>
168
+
169
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
170
+
171
+ </dd>
172
+ </dl>
173
+ </dd>
174
+ </dl>
175
+
176
+
177
+ </dd>
178
+ </dl>
179
+ </details>
180
+
181
+ ## BindingPlan
182
+ <details><summary><code>client.binding_plan.<a href="src/base_client/binding_plan/client.py">get_binding_plan</a>(...) -> DagsterBindingPlanAll</code></summary>
183
+ <dl>
184
+ <dd>
185
+
186
+ #### 🔌 Usage
187
+
188
+ <dl>
189
+ <dd>
190
+
191
+ <dl>
192
+ <dd>
193
+
194
+ ```python
195
+ from base_client import BaseAPIClient
196
+
197
+ client = BaseAPIClient(
198
+ base_url="https://yourhost.com/path/to/api",
199
+ )
200
+
201
+ client.binding_plan.get_binding_plan(
202
+ base_id="base_id",
203
+ )
204
+
205
+ ```
206
+ </dd>
207
+ </dl>
208
+ </dd>
209
+ </dl>
210
+
211
+ #### ⚙️ Parameters
212
+
213
+ <dl>
214
+ <dd>
215
+
216
+ <dl>
217
+ <dd>
218
+
219
+ **base_id:** `str`
220
+
221
+ </dd>
222
+ </dl>
223
+
224
+ <dl>
225
+ <dd>
226
+
227
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
228
+
229
+ </dd>
230
+ </dl>
231
+ </dd>
232
+ </dl>
233
+
234
+
235
+ </dd>
236
+ </dl>
237
+ </details>
238
+
239
+ ## Bindings
240
+ <details><summary><code>client.bindings.<a href="src/base_client/bindings/client.py">list_bindings</a>(...) -> ListBindingsResponse</code></summary>
241
+ <dl>
242
+ <dd>
243
+
244
+ #### 🔌 Usage
245
+
246
+ <dl>
247
+ <dd>
248
+
249
+ <dl>
250
+ <dd>
251
+
252
+ ```python
253
+ from base_client import BaseAPIClient
254
+
255
+ client = BaseAPIClient(
256
+ base_url="https://yourhost.com/path/to/api",
257
+ )
258
+
259
+ client.bindings.list_bindings(
260
+ base_id="base_id",
261
+ )
262
+
263
+ ```
264
+ </dd>
265
+ </dl>
266
+ </dd>
267
+ </dl>
268
+
269
+ #### ⚙️ Parameters
270
+
271
+ <dl>
272
+ <dd>
273
+
274
+ <dl>
275
+ <dd>
276
+
277
+ **base_id:** `str`
278
+
279
+ </dd>
280
+ </dl>
281
+
282
+ <dl>
283
+ <dd>
284
+
285
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
286
+
287
+ </dd>
288
+ </dl>
289
+ </dd>
290
+ </dl>
291
+
292
+
293
+ </dd>
294
+ </dl>
295
+ </details>
296
+
297
+ <details><summary><code>client.bindings.<a href="src/base_client/bindings/client.py">create_binding</a>(...) -> Binding</code></summary>
298
+ <dl>
299
+ <dd>
300
+
301
+ #### 🔌 Usage
302
+
303
+ <dl>
304
+ <dd>
305
+
306
+ <dl>
307
+ <dd>
308
+
309
+ ```python
310
+ from base_client import BaseAPIClient, BindingAuthInput_ApiKey
311
+
312
+ client = BaseAPIClient(
313
+ base_url="https://yourhost.com/path/to/api",
314
+ )
315
+
316
+ client.bindings.create_binding(
317
+ base_id="base_id",
318
+ auth=BindingAuthInput_ApiKey(
319
+ api_key_secret="api_key_secret",
320
+ ),
321
+ plugin_id="plugin_id",
322
+ )
323
+
324
+ ```
325
+ </dd>
326
+ </dl>
327
+ </dd>
328
+ </dl>
329
+
330
+ #### ⚙️ Parameters
331
+
332
+ <dl>
333
+ <dd>
334
+
335
+ <dl>
336
+ <dd>
337
+
338
+ **base_id:** `str`
339
+
340
+ </dd>
341
+ </dl>
342
+
343
+ <dl>
344
+ <dd>
345
+
346
+ **auth:** `BindingAuthInput`
347
+
348
+ </dd>
349
+ </dl>
350
+
351
+ <dl>
352
+ <dd>
353
+
354
+ **plugin_id:** `str`
355
+
356
+ </dd>
357
+ </dl>
358
+
359
+ <dl>
360
+ <dd>
361
+
362
+ **config:** `typing.Optional[typing.Dict[str, typing.Any]]`
363
+
364
+ </dd>
365
+ </dl>
366
+
367
+ <dl>
368
+ <dd>
369
+
370
+ **enabled:** `typing.Optional[bool]`
371
+
372
+ </dd>
373
+ </dl>
374
+
375
+ <dl>
376
+ <dd>
377
+
378
+ **models:** `typing.Optional[BindingModels]`
379
+
380
+ </dd>
381
+ </dl>
382
+
383
+ <dl>
384
+ <dd>
385
+
386
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
387
+
388
+ </dd>
389
+ </dl>
390
+ </dd>
391
+ </dl>
392
+
393
+
394
+ </dd>
395
+ </dl>
396
+ </details>
397
+
398
+ ## Dsn
399
+ <details><summary><code>client.dsn.<a href="src/base_client/dsn/client.py">get_dsn</a>(...) -> DsnResponse</code></summary>
400
+ <dl>
401
+ <dd>
402
+
403
+ #### 🔌 Usage
404
+
405
+ <dl>
406
+ <dd>
407
+
408
+ <dl>
409
+ <dd>
410
+
411
+ ```python
412
+ from base_client import BaseAPIClient
413
+
414
+ client = BaseAPIClient(
415
+ base_url="https://yourhost.com/path/to/api",
416
+ )
417
+
418
+ client.dsn.get_dsn(
419
+ base_id="base_id",
420
+ )
421
+
422
+ ```
423
+ </dd>
424
+ </dl>
425
+ </dd>
426
+ </dl>
427
+
428
+ #### ⚙️ Parameters
429
+
430
+ <dl>
431
+ <dd>
432
+
433
+ <dl>
434
+ <dd>
435
+
436
+ **base_id:** `str`
437
+
438
+ </dd>
439
+ </dl>
440
+
441
+ <dl>
442
+ <dd>
443
+
444
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
445
+
446
+ </dd>
447
+ </dl>
448
+ </dd>
449
+ </dl>
450
+
451
+
452
+ </dd>
453
+ </dl>
454
+ </details>
455
+
456
+ ## SyncState
457
+ <details><summary><code>client.sync_state.<a href="src/base_client/sync_state/client.py">get_sync_state</a>(...) -> BindingStateResponse</code></summary>
458
+ <dl>
459
+ <dd>
460
+
461
+ #### 🔌 Usage
462
+
463
+ <dl>
464
+ <dd>
465
+
466
+ <dl>
467
+ <dd>
468
+
469
+ ```python
470
+ from base_client import BaseAPIClient
471
+
472
+ client = BaseAPIClient(
473
+ base_url="https://yourhost.com/path/to/api",
474
+ )
475
+
476
+ client.sync_state.get_sync_state(
477
+ base_id="base_id",
478
+ )
479
+
480
+ ```
481
+ </dd>
482
+ </dl>
483
+ </dd>
484
+ </dl>
485
+
486
+ #### ⚙️ Parameters
487
+
488
+ <dl>
489
+ <dd>
490
+
491
+ <dl>
492
+ <dd>
493
+
494
+ **base_id:** `str`
495
+
496
+ </dd>
497
+ </dl>
498
+
499
+ <dl>
500
+ <dd>
501
+
502
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
503
+
504
+ </dd>
505
+ </dl>
506
+ </dd>
507
+ </dl>
508
+
509
+
510
+ </dd>
511
+ </dl>
512
+ </details>
513
+
514
+ <details><summary><code>client.sync_state.<a href="src/base_client/sync_state/client.py">report_sync_state</a>(...)</code></summary>
515
+ <dl>
516
+ <dd>
517
+
518
+ #### 🔌 Usage
519
+
520
+ <dl>
521
+ <dd>
522
+
523
+ <dl>
524
+ <dd>
525
+
526
+ ```python
527
+ from base_client import BaseAPIClient
528
+ from base_client.sync_state import SyncStateInputBindingsValue
529
+
530
+ client = BaseAPIClient(
531
+ base_url="https://yourhost.com/path/to/api",
532
+ )
533
+
534
+ client.sync_state.report_sync_state(
535
+ base_id="base_id",
536
+ bindings={
537
+ "key": SyncStateInputBindingsValue()
538
+ },
539
+ version=1.1,
540
+ )
541
+
542
+ ```
543
+ </dd>
544
+ </dl>
545
+ </dd>
546
+ </dl>
547
+
548
+ #### ⚙️ Parameters
549
+
550
+ <dl>
551
+ <dd>
552
+
553
+ <dl>
554
+ <dd>
555
+
556
+ **base_id:** `str`
557
+
558
+ </dd>
559
+ </dl>
560
+
561
+ <dl>
562
+ <dd>
563
+
564
+ **bindings:** `typing.Dict[str, SyncStateInputBindingsValue]`
565
+
566
+ </dd>
567
+ </dl>
568
+
569
+ <dl>
570
+ <dd>
571
+
572
+ **version:** `float`
573
+
574
+ </dd>
575
+ </dl>
576
+
577
+ <dl>
578
+ <dd>
579
+
580
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
581
+
582
+ </dd>
583
+ </dl>
584
+ </dd>
585
+ </dl>
586
+
587
+
588
+ </dd>
589
+ </dl>
590
+ </details>
591
+
@@ -0,0 +1,34 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ import typing
6
+ from importlib import import_module
7
+
8
+ if typing.TYPE_CHECKING:
9
+ from .types import SyncStateInputBindingsValue
10
+ _dynamic_imports: typing.Dict[str, str] = {"SyncStateInputBindingsValue": ".types"}
11
+
12
+
13
+ def __getattr__(attr_name: str) -> typing.Any:
14
+ module_name = _dynamic_imports.get(attr_name)
15
+ if module_name is None:
16
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
17
+ try:
18
+ module = import_module(module_name, __package__)
19
+ if module_name == f".{attr_name}":
20
+ return module
21
+ else:
22
+ return getattr(module, attr_name)
23
+ except ImportError as e:
24
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
25
+ except AttributeError as e:
26
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
27
+
28
+
29
+ def __dir__():
30
+ lazy_attrs = list(_dynamic_imports.keys())
31
+ return sorted(lazy_attrs)
32
+
33
+
34
+ __all__ = ["SyncStateInputBindingsValue"]