airbyte-cdk 6.61.2__py3-none-any.whl → 6.61.4__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 (31) hide show
  1. airbyte_cdk/manifest_server/Dockerfile +45 -0
  2. airbyte_cdk/manifest_server/README.md +142 -0
  3. airbyte_cdk/manifest_server/__init__.py +3 -0
  4. airbyte_cdk/manifest_server/api_models/__init__.py +49 -0
  5. airbyte_cdk/manifest_server/api_models/capabilities.py +7 -0
  6. airbyte_cdk/manifest_server/api_models/dicts.py +17 -0
  7. airbyte_cdk/manifest_server/api_models/manifest.py +73 -0
  8. airbyte_cdk/manifest_server/api_models/stream.py +76 -0
  9. airbyte_cdk/manifest_server/app.py +17 -0
  10. airbyte_cdk/manifest_server/auth.py +43 -0
  11. airbyte_cdk/manifest_server/cli/__init__.py +5 -0
  12. airbyte_cdk/manifest_server/cli/_common.py +28 -0
  13. airbyte_cdk/manifest_server/cli/_info.py +30 -0
  14. airbyte_cdk/manifest_server/cli/_openapi.py +43 -0
  15. airbyte_cdk/manifest_server/cli/_start.py +38 -0
  16. airbyte_cdk/manifest_server/cli/run.py +59 -0
  17. airbyte_cdk/manifest_server/command_processor/__init__.py +0 -0
  18. airbyte_cdk/manifest_server/command_processor/processor.py +122 -0
  19. airbyte_cdk/manifest_server/command_processor/utils.py +99 -0
  20. airbyte_cdk/manifest_server/main.py +24 -0
  21. airbyte_cdk/manifest_server/openapi.yaml +641 -0
  22. airbyte_cdk/manifest_server/routers/__init__.py +0 -0
  23. airbyte_cdk/manifest_server/routers/capabilities.py +25 -0
  24. airbyte_cdk/manifest_server/routers/health.py +13 -0
  25. airbyte_cdk/manifest_server/routers/manifest.py +155 -0
  26. {airbyte_cdk-6.61.2.dist-info → airbyte_cdk-6.61.4.dist-info}/METADATA +4 -1
  27. {airbyte_cdk-6.61.2.dist-info → airbyte_cdk-6.61.4.dist-info}/RECORD +31 -6
  28. {airbyte_cdk-6.61.2.dist-info → airbyte_cdk-6.61.4.dist-info}/entry_points.txt +1 -0
  29. {airbyte_cdk-6.61.2.dist-info → airbyte_cdk-6.61.4.dist-info}/LICENSE.txt +0 -0
  30. {airbyte_cdk-6.61.2.dist-info → airbyte_cdk-6.61.4.dist-info}/LICENSE_SHORT +0 -0
  31. {airbyte_cdk-6.61.2.dist-info → airbyte_cdk-6.61.4.dist-info}/WHEEL +0 -0
@@ -0,0 +1,641 @@
1
+ # This file is auto-generated. Do not edit manually.
2
+ # To regenerate, run: manifest-server generate-openapi
3
+
4
+ openapi: 3.1.0
5
+ info:
6
+ title: Manifest Server
7
+ description: A service for running low-code Airbyte connectors
8
+ contact:
9
+ name: Airbyte
10
+ url: https://airbyte.com/
11
+ version: 0.1.0
12
+ paths:
13
+ /health/:
14
+ get:
15
+ tags:
16
+ - health
17
+ summary: Health
18
+ operationId: health_health__get
19
+ responses:
20
+ '200':
21
+ description: Successful Response
22
+ content:
23
+ application/json:
24
+ schema:
25
+ additionalProperties:
26
+ type: string
27
+ type: object
28
+ title: Response Health Health Get
29
+ /capabilities/:
30
+ get:
31
+ tags:
32
+ - capabilities
33
+ summary: Get Capabilities
34
+ description: "Get the capabilities available for the manifest server.\n\nReturns:\n\
35
+ \ Dict containing the service capabilities including custom code execution\
36
+ \ support."
37
+ operationId: getCapabilities
38
+ responses:
39
+ '200':
40
+ description: Successful Response
41
+ content:
42
+ application/json:
43
+ schema:
44
+ $ref: '#/components/schemas/CapabilitiesResponse'
45
+ /v1/manifest/test_read:
46
+ post:
47
+ tags:
48
+ - manifest
49
+ summary: Test Read
50
+ description: Test reading from a specific stream in the manifest.
51
+ operationId: testRead
52
+ requestBody:
53
+ content:
54
+ application/json:
55
+ schema:
56
+ $ref: '#/components/schemas/StreamTestReadRequest'
57
+ required: true
58
+ responses:
59
+ '200':
60
+ description: Successful Response
61
+ content:
62
+ application/json:
63
+ schema:
64
+ $ref: '#/components/schemas/StreamReadResponse'
65
+ '422':
66
+ description: Validation Error
67
+ content:
68
+ application/json:
69
+ schema:
70
+ $ref: '#/components/schemas/HTTPValidationError'
71
+ security:
72
+ - HTTPBearer: []
73
+ /v1/manifest/check:
74
+ post:
75
+ tags:
76
+ - manifest
77
+ summary: Check
78
+ description: Check configuration against a manifest
79
+ operationId: check
80
+ requestBody:
81
+ content:
82
+ application/json:
83
+ schema:
84
+ $ref: '#/components/schemas/CheckRequest'
85
+ required: true
86
+ responses:
87
+ '200':
88
+ description: Successful Response
89
+ content:
90
+ application/json:
91
+ schema:
92
+ $ref: '#/components/schemas/CheckResponse'
93
+ '422':
94
+ description: Validation Error
95
+ content:
96
+ application/json:
97
+ schema:
98
+ $ref: '#/components/schemas/HTTPValidationError'
99
+ security:
100
+ - HTTPBearer: []
101
+ /v1/manifest/discover:
102
+ post:
103
+ tags:
104
+ - manifest
105
+ summary: Discover
106
+ description: Discover streams from a manifest
107
+ operationId: discover
108
+ requestBody:
109
+ content:
110
+ application/json:
111
+ schema:
112
+ $ref: '#/components/schemas/DiscoverRequest'
113
+ required: true
114
+ responses:
115
+ '200':
116
+ description: Successful Response
117
+ content:
118
+ application/json:
119
+ schema:
120
+ $ref: '#/components/schemas/DiscoverResponse'
121
+ '422':
122
+ description: Validation Error
123
+ content:
124
+ application/json:
125
+ schema:
126
+ $ref: '#/components/schemas/HTTPValidationError'
127
+ security:
128
+ - HTTPBearer: []
129
+ /v1/manifest/resolve:
130
+ post:
131
+ tags:
132
+ - manifest
133
+ summary: Resolve
134
+ description: Resolve a manifest to its final configuration.
135
+ operationId: resolve
136
+ requestBody:
137
+ content:
138
+ application/json:
139
+ schema:
140
+ $ref: '#/components/schemas/ResolveRequest'
141
+ required: true
142
+ responses:
143
+ '200':
144
+ description: Successful Response
145
+ content:
146
+ application/json:
147
+ schema:
148
+ $ref: '#/components/schemas/ManifestResponse'
149
+ '422':
150
+ description: Validation Error
151
+ content:
152
+ application/json:
153
+ schema:
154
+ $ref: '#/components/schemas/HTTPValidationError'
155
+ security:
156
+ - HTTPBearer: []
157
+ /v1/manifest/full_resolve:
158
+ post:
159
+ tags:
160
+ - manifest
161
+ summary: Full Resolve
162
+ description: 'Fully resolve a manifest, including dynamic streams.
163
+
164
+
165
+ This is a similar operation to resolve, but has an extra step which generates
166
+ streams from dynamic stream templates if the manifest contains any. This is
167
+ used when a user clicks the generate streams button on a stream template in
168
+ the Builder UI'
169
+ operationId: fullResolve
170
+ requestBody:
171
+ content:
172
+ application/json:
173
+ schema:
174
+ $ref: '#/components/schemas/FullResolveRequest'
175
+ required: true
176
+ responses:
177
+ '200':
178
+ description: Successful Response
179
+ content:
180
+ application/json:
181
+ schema:
182
+ $ref: '#/components/schemas/ManifestResponse'
183
+ '422':
184
+ description: Validation Error
185
+ content:
186
+ application/json:
187
+ schema:
188
+ $ref: '#/components/schemas/HTTPValidationError'
189
+ security:
190
+ - HTTPBearer: []
191
+ components:
192
+ schemas:
193
+ AirbyteCatalog:
194
+ properties:
195
+ streams:
196
+ items:
197
+ $ref: '#/components/schemas/AirbyteStream'
198
+ type: array
199
+ title: Streams
200
+ type: object
201
+ required:
202
+ - streams
203
+ title: AirbyteCatalog
204
+ AirbyteStream:
205
+ properties:
206
+ name:
207
+ type: string
208
+ title: Name
209
+ json_schema:
210
+ type: object
211
+ title: Json Schema
212
+ supported_sync_modes:
213
+ items:
214
+ $ref: '#/components/schemas/SyncMode'
215
+ type: array
216
+ title: Supported Sync Modes
217
+ source_defined_cursor:
218
+ anyOf:
219
+ - type: boolean
220
+ - type: 'null'
221
+ title: Source Defined Cursor
222
+ default_cursor_field:
223
+ anyOf:
224
+ - items:
225
+ type: string
226
+ type: array
227
+ - type: 'null'
228
+ title: Default Cursor Field
229
+ source_defined_primary_key:
230
+ anyOf:
231
+ - items:
232
+ items:
233
+ type: string
234
+ type: array
235
+ type: array
236
+ - type: 'null'
237
+ title: Source Defined Primary Key
238
+ namespace:
239
+ anyOf:
240
+ - type: string
241
+ - type: 'null'
242
+ title: Namespace
243
+ is_resumable:
244
+ anyOf:
245
+ - type: boolean
246
+ - type: 'null'
247
+ title: Is Resumable
248
+ is_file_based:
249
+ anyOf:
250
+ - type: boolean
251
+ - type: 'null'
252
+ title: Is File Based
253
+ type: object
254
+ required:
255
+ - name
256
+ - json_schema
257
+ - supported_sync_modes
258
+ title: AirbyteStream
259
+ AuxiliaryRequest:
260
+ properties:
261
+ title:
262
+ type: string
263
+ title: Title
264
+ type:
265
+ type: string
266
+ title: Type
267
+ description:
268
+ type: string
269
+ title: Description
270
+ request:
271
+ $ref: '#/components/schemas/HttpRequest'
272
+ response:
273
+ $ref: '#/components/schemas/HttpResponse'
274
+ type: object
275
+ required:
276
+ - title
277
+ - type
278
+ - description
279
+ - request
280
+ - response
281
+ title: AuxiliaryRequest
282
+ description: Auxiliary HTTP request made during stream processing.
283
+ CapabilitiesResponse:
284
+ properties:
285
+ custom_code_execution:
286
+ type: boolean
287
+ title: Custom Code Execution
288
+ type: object
289
+ required:
290
+ - custom_code_execution
291
+ title: CapabilitiesResponse
292
+ description: Capabilities of the manifest server.
293
+ CheckRequest:
294
+ properties:
295
+ manifest:
296
+ $ref: '#/components/schemas/Manifest'
297
+ config:
298
+ $ref: '#/components/schemas/ConnectorConfig'
299
+ type: object
300
+ required:
301
+ - manifest
302
+ - config
303
+ title: CheckRequest
304
+ description: Request to check a manifest.
305
+ CheckResponse:
306
+ properties:
307
+ success:
308
+ type: boolean
309
+ title: Success
310
+ message:
311
+ anyOf:
312
+ - type: string
313
+ - type: 'null'
314
+ title: Message
315
+ type: object
316
+ required:
317
+ - success
318
+ title: CheckResponse
319
+ description: Response to check a manifest.
320
+ ConnectorConfig:
321
+ properties: {}
322
+ additionalProperties: true
323
+ type: object
324
+ title: ConnectorConfig
325
+ description: Base connector configuration model. Allows client generation to
326
+ replace with proper JsonNode types.
327
+ DiscoverRequest:
328
+ properties:
329
+ manifest:
330
+ $ref: '#/components/schemas/Manifest'
331
+ config:
332
+ $ref: '#/components/schemas/ConnectorConfig'
333
+ type: object
334
+ required:
335
+ - manifest
336
+ - config
337
+ title: DiscoverRequest
338
+ description: Request to discover a manifest.
339
+ DiscoverResponse:
340
+ properties:
341
+ catalog:
342
+ $ref: '#/components/schemas/AirbyteCatalog'
343
+ type: object
344
+ required:
345
+ - catalog
346
+ title: DiscoverResponse
347
+ description: Response to discover a manifest.
348
+ FullResolveRequest:
349
+ properties:
350
+ manifest:
351
+ $ref: '#/components/schemas/Manifest'
352
+ config:
353
+ $ref: '#/components/schemas/ConnectorConfig'
354
+ stream_limit:
355
+ type: integer
356
+ maximum: 100.0
357
+ minimum: 1.0
358
+ title: Stream Limit
359
+ default: 100
360
+ type: object
361
+ required:
362
+ - manifest
363
+ - config
364
+ title: FullResolveRequest
365
+ description: Request to fully resolve a manifest.
366
+ HTTPValidationError:
367
+ properties:
368
+ detail:
369
+ items:
370
+ $ref: '#/components/schemas/ValidationError'
371
+ type: array
372
+ title: Detail
373
+ type: object
374
+ title: HTTPValidationError
375
+ HttpRequest:
376
+ properties:
377
+ url:
378
+ type: string
379
+ title: Url
380
+ headers:
381
+ anyOf:
382
+ - type: object
383
+ - type: 'null'
384
+ title: Headers
385
+ http_method:
386
+ type: string
387
+ title: Http Method
388
+ body:
389
+ anyOf:
390
+ - type: string
391
+ - type: 'null'
392
+ title: Body
393
+ type: object
394
+ required:
395
+ - url
396
+ - headers
397
+ - http_method
398
+ title: HttpRequest
399
+ description: HTTP request details.
400
+ HttpResponse:
401
+ properties:
402
+ status:
403
+ type: integer
404
+ title: Status
405
+ body:
406
+ anyOf:
407
+ - type: string
408
+ - type: 'null'
409
+ title: Body
410
+ headers:
411
+ anyOf:
412
+ - type: object
413
+ - type: 'null'
414
+ title: Headers
415
+ type: object
416
+ required:
417
+ - status
418
+ title: HttpResponse
419
+ description: HTTP response details.
420
+ LogMessage:
421
+ properties:
422
+ message:
423
+ type: string
424
+ title: Message
425
+ level:
426
+ type: string
427
+ title: Level
428
+ internal_message:
429
+ anyOf:
430
+ - type: string
431
+ - type: 'null'
432
+ title: Internal Message
433
+ stacktrace:
434
+ anyOf:
435
+ - type: string
436
+ - type: 'null'
437
+ title: Stacktrace
438
+ type: object
439
+ required:
440
+ - message
441
+ - level
442
+ title: LogMessage
443
+ description: Log message from stream processing.
444
+ Manifest:
445
+ properties: {}
446
+ additionalProperties: true
447
+ type: object
448
+ title: Manifest
449
+ description: Base manifest model. Allows client generation to replace with proper
450
+ JsonNode types.
451
+ ManifestResponse:
452
+ properties:
453
+ manifest:
454
+ $ref: '#/components/schemas/Manifest'
455
+ type: object
456
+ required:
457
+ - manifest
458
+ title: ManifestResponse
459
+ description: Response containing a manifest.
460
+ ResolveRequest:
461
+ properties:
462
+ manifest:
463
+ $ref: '#/components/schemas/Manifest'
464
+ type: object
465
+ required:
466
+ - manifest
467
+ title: ResolveRequest
468
+ description: Request to resolve a manifest.
469
+ StreamReadPages:
470
+ properties:
471
+ records:
472
+ items: {}
473
+ type: array
474
+ title: Records
475
+ request:
476
+ anyOf:
477
+ - $ref: '#/components/schemas/HttpRequest'
478
+ - type: 'null'
479
+ response:
480
+ anyOf:
481
+ - $ref: '#/components/schemas/HttpResponse'
482
+ - type: 'null'
483
+ type: object
484
+ required:
485
+ - records
486
+ title: StreamReadPages
487
+ description: Pages of data read from a stream slice.
488
+ StreamReadResponse:
489
+ properties:
490
+ logs:
491
+ items:
492
+ $ref: '#/components/schemas/LogMessage'
493
+ type: array
494
+ title: Logs
495
+ slices:
496
+ items:
497
+ $ref: '#/components/schemas/StreamReadSlices'
498
+ type: array
499
+ title: Slices
500
+ test_read_limit_reached:
501
+ type: boolean
502
+ title: Test Read Limit Reached
503
+ auxiliary_requests:
504
+ items:
505
+ $ref: '#/components/schemas/AuxiliaryRequest'
506
+ type: array
507
+ title: Auxiliary Requests
508
+ inferred_schema:
509
+ anyOf:
510
+ - type: object
511
+ - type: 'null'
512
+ title: Inferred Schema
513
+ inferred_datetime_formats:
514
+ anyOf:
515
+ - additionalProperties:
516
+ type: string
517
+ type: object
518
+ - type: 'null'
519
+ title: Inferred Datetime Formats
520
+ latest_config_update:
521
+ anyOf:
522
+ - type: object
523
+ - type: 'null'
524
+ title: Latest Config Update
525
+ type: object
526
+ required:
527
+ - logs
528
+ - slices
529
+ - test_read_limit_reached
530
+ - auxiliary_requests
531
+ - inferred_schema
532
+ - inferred_datetime_formats
533
+ - latest_config_update
534
+ title: StreamReadResponse
535
+ description: Complete stream read response with properly typed fields.
536
+ StreamReadSlices:
537
+ properties:
538
+ pages:
539
+ items:
540
+ $ref: '#/components/schemas/StreamReadPages'
541
+ type: array
542
+ title: Pages
543
+ slice_descriptor:
544
+ anyOf:
545
+ - type: string
546
+ - type: 'null'
547
+ title: Slice Descriptor
548
+ state:
549
+ anyOf:
550
+ - items:
551
+ type: object
552
+ type: array
553
+ - type: 'null'
554
+ title: State
555
+ auxiliary_requests:
556
+ anyOf:
557
+ - items:
558
+ $ref: '#/components/schemas/AuxiliaryRequest'
559
+ type: array
560
+ - type: 'null'
561
+ title: Auxiliary Requests
562
+ type: object
563
+ required:
564
+ - pages
565
+ - slice_descriptor
566
+ title: StreamReadSlices
567
+ description: Slices of data read from a stream.
568
+ StreamTestReadRequest:
569
+ properties:
570
+ manifest:
571
+ $ref: '#/components/schemas/Manifest'
572
+ config:
573
+ $ref: '#/components/schemas/ConnectorConfig'
574
+ stream_name:
575
+ type: string
576
+ title: Stream Name
577
+ state:
578
+ items: {}
579
+ type: array
580
+ title: State
581
+ custom_components_code:
582
+ anyOf:
583
+ - type: string
584
+ - type: 'null'
585
+ title: Custom Components Code
586
+ record_limit:
587
+ type: integer
588
+ maximum: 5000.0
589
+ minimum: 1.0
590
+ title: Record Limit
591
+ default: 100
592
+ page_limit:
593
+ type: integer
594
+ maximum: 20.0
595
+ minimum: 1.0
596
+ title: Page Limit
597
+ default: 5
598
+ slice_limit:
599
+ type: integer
600
+ maximum: 20.0
601
+ minimum: 1.0
602
+ title: Slice Limit
603
+ default: 5
604
+ type: object
605
+ required:
606
+ - manifest
607
+ - config
608
+ - stream_name
609
+ title: StreamTestReadRequest
610
+ description: Request to test read from a specific stream.
611
+ SyncMode:
612
+ type: string
613
+ enum:
614
+ - full_refresh
615
+ - incremental
616
+ title: SyncMode
617
+ ValidationError:
618
+ properties:
619
+ loc:
620
+ items:
621
+ anyOf:
622
+ - type: string
623
+ - type: integer
624
+ type: array
625
+ title: Location
626
+ msg:
627
+ type: string
628
+ title: Message
629
+ type:
630
+ type: string
631
+ title: Error Type
632
+ type: object
633
+ required:
634
+ - loc
635
+ - msg
636
+ - type
637
+ title: ValidationError
638
+ securitySchemes:
639
+ HTTPBearer:
640
+ type: http
641
+ scheme: bearer
File without changes
@@ -0,0 +1,25 @@
1
+ import os
2
+ from typing import Any, Dict
3
+
4
+ from fastapi import APIRouter
5
+
6
+ from ..api_models.capabilities import CapabilitiesResponse
7
+
8
+ router = APIRouter(
9
+ prefix="/capabilities",
10
+ tags=["capabilities"],
11
+ )
12
+
13
+
14
+ @router.get("/", operation_id="getCapabilities")
15
+ def get_capabilities() -> CapabilitiesResponse:
16
+ """
17
+ Get the capabilities available for the manifest server.
18
+
19
+ Returns:
20
+ Dict containing the service capabilities including custom code execution support.
21
+ """
22
+ # Read the same environment variable as the connector builder server
23
+ enable_unsafe_code = os.getenv("AIRBYTE_ENABLE_UNSAFE_CODE", "false").lower() == "true"
24
+
25
+ return CapabilitiesResponse(custom_code_execution=enable_unsafe_code)
@@ -0,0 +1,13 @@
1
+ from typing import Dict
2
+
3
+ from fastapi import APIRouter
4
+
5
+ router = APIRouter(
6
+ prefix="/health",
7
+ tags=["health"],
8
+ )
9
+
10
+
11
+ @router.get("/")
12
+ def health() -> Dict[str, str]:
13
+ return {"status": "ok"}