airbyte-source-google-drive 0.2.0.dev202502052009__py3-none-any.whl → 0.2.0.dev202502141828__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.

Potentially problematic release.


This version of airbyte-source-google-drive might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: airbyte-source-google-drive
3
- Version: 0.2.0.dev202502052009
3
+ Version: 0.2.0.dev202502141828
4
4
  Summary: Source implementation for Google Drive.
5
5
  License: ELv2
6
6
  Author: Airbyte
@@ -10,7 +10,7 @@ Classifier: License :: Other/Proprietary License
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
- Requires-Dist: airbyte-cdk[file-based] (==6.26.0.dev04108)
13
+ Requires-Dist: airbyte-cdk[file-based] (>=6.33.6,<7.0.0)
14
14
  Requires-Dist: google-api-python-client (==2.104.0)
15
15
  Requires-Dist: google-api-python-client-stubs (==1.18.0)
16
16
  Requires-Dist: google-auth-httplib2 (==0.1.1)
@@ -0,0 +1,13 @@
1
+ source_google_drive/__init__.py,sha256=SAgPIoGpjdHTY7mvf__A99FiElBh3WvdKSHLstg-BUE,134
2
+ source_google_drive/exceptions.py,sha256=6sBxbdZhj0CARkctfBaNgGHB_GGcFUkY4cnMUWyOruM,268
3
+ source_google_drive/run.py,sha256=5AQd906FbSGaNZj0udrr-VKmiSS4nsor7F7noMjsdi0,677
4
+ source_google_drive/schemas/file_permissions.json,sha256=IPhh3UIKwgtfNLNH9sndu4pMZt8zFXaBSUIWAfIRGQc,269
5
+ source_google_drive/schemas/identities.json,sha256=JXBR_v0wpfDKiWVzLoc8bPs33x5CGm91fEdJWz8RBxc,449
6
+ source_google_drive/source.py,sha256=tOljkgeg8RIxmhrpfa-qgGhI6WPhiL_-I8itTa6JH04,3959
7
+ source_google_drive/spec.py,sha256=-WkA2zGuQtf3G7uK8uq9BnimUlQh0s3vsqROmIHOgzI,4718
8
+ source_google_drive/stream_reader.py,sha256=W9I0tE-qUXkxEFeblwqrhtyKDV8T_EGpf5a3Q1ZolAE,20683
9
+ source_google_drive/utils.py,sha256=ewR-kBKLmtD-s7zqCfGECfzWYF43tpQdscAQIlUEkR8,1022
10
+ airbyte_source_google_drive-0.2.0.dev202502141828.dist-info/METADATA,sha256=oH1ixiBIrMyUH4vmuCp9MjTTRi6BVdEfYP-HBUI2Bfc,5534
11
+ airbyte_source_google_drive-0.2.0.dev202502141828.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
12
+ airbyte_source_google_drive-0.2.0.dev202502141828.dist-info/entry_points.txt,sha256=YgpJf0nA5Mn0B7YC9VOFI847vz1jI6U4q7BeLUOXa54,67
13
+ airbyte_source_google_drive-0.2.0.dev202502141828.dist-info/RECORD,,
@@ -0,0 +1,12 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "id": { "type": "string" },
5
+ "file_path": { "type": "string" },
6
+ "allowed_identity_remote_ids": {
7
+ "type": "array",
8
+ "items": { "type": "string" }
9
+ },
10
+ "publicly_accessible": { "type": "boolean" }
11
+ }
12
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "id": { "type": "string" },
5
+ "remote_id": { "type": "string" },
6
+ "parent_id": { "type": ["null", "string"] },
7
+ "name": { "type": ["null", "string"] },
8
+ "description": { "type": ["null", "string"] },
9
+ "email_address": { "type": ["null", "string"] },
10
+ "member_email_addresses": { "type": ["null", "array"] },
11
+ "type": { "type": "string" },
12
+ "modified_at": { "type": "string" }
13
+ }
14
+ }
@@ -6,7 +6,7 @@
6
6
  from typing import Any, Mapping, Optional
7
7
 
8
8
  from airbyte_cdk import AdvancedAuth, ConfiguredAirbyteCatalog, ConnectorSpecification, OAuthConfigSpecification, TState
9
- from airbyte_cdk.models import AuthFlowType
9
+ from airbyte_cdk.models import AuthFlowType, OauthConnectorInputSpecification
10
10
  from airbyte_cdk.sources.file_based.file_based_source import FileBasedSource
11
11
  from airbyte_cdk.sources.file_based.stream.cursor.default_file_based_cursor import DefaultFileBasedCursor
12
12
  from source_google_drive.spec import SourceGoogleDriveSpec
@@ -28,6 +28,11 @@ class SourceGoogleDrive(FileBasedSource):
28
28
  """
29
29
  Returns the specification describing what fields can be configured by a user when setting up a file-based source.
30
30
  """
31
+ oauth_connector_input_specification = OauthConnectorInputSpecification(
32
+ consent_url="https://accounts.google.com/o/oauth2/v2/auth?{{client_id_param}}&{{redirect_uri_param}}&response_type=code&{{scope_param}}&access_type=offline&{{state_param}}&include_granted_scopes=true&prompt=consent",
33
+ access_token_url="https://oauth2.googleapis.com/token?{{client_id_param}}&{{client_secret_param}}&{{auth_code_param}}&{{redirect_uri_param}}&grant_type=authorization_code",
34
+ scope="https://www.googleapis.com/auth/drive.readonly https://www.googleapis.com/auth/admin.directory.group.readonly https://www.googleapis.com/auth/admin.directory.group.member.readonly https://www.googleapis.com/auth/admin.directory.user.readonly",
35
+ )
31
36
 
32
37
  return ConnectorSpecification(
33
38
  documentationUrl=self.spec_class.documentation_url(),
@@ -37,10 +42,17 @@ class SourceGoogleDrive(FileBasedSource):
37
42
  predicate_key=["credentials", "auth_type"],
38
43
  predicate_value="Client",
39
44
  oauth_config_specification=OAuthConfigSpecification(
45
+ oauth_connector_input_specification=oauth_connector_input_specification,
40
46
  complete_oauth_output_specification={
41
47
  "type": "object",
42
48
  "additionalProperties": False,
43
- "properties": {"refresh_token": {"type": "string", "path_in_connector_config": ["credentials", "refresh_token"]}},
49
+ "properties": {
50
+ "refresh_token": {
51
+ "type": "string",
52
+ "path_in_connector_config": ["credentials", "refresh_token"],
53
+ "path_in_oauth_response": ["refresh_token"],
54
+ }
55
+ },
44
56
  },
45
57
  complete_oauth_server_input_specification={
46
58
  "type": "object",
@@ -21,6 +21,8 @@ from airbyte_cdk import AirbyteTracedException, FailureType
21
21
  from airbyte_cdk.sources.file_based.exceptions import FileSizeLimitError
22
22
  from airbyte_cdk.sources.file_based.file_based_stream_reader import AbstractFileBasedStreamReader, FileReadMode
23
23
  from airbyte_cdk.sources.file_based.remote_file import RemoteFile
24
+ from airbyte_cdk.sources.streams.core import package_name_from_class
25
+ from airbyte_cdk.sources.utils.schema_helpers import InternalConfig, ResourceSchemaLoader
24
26
  from source_google_drive.utils import get_folder_id
25
27
 
26
28
  from .exceptions import ErrorDownloadingFile, ErrorFetchingMetadata
@@ -441,3 +443,11 @@ class SourceGoogleDriveStreamReader(AbstractFileBasedStreamReader):
441
443
  rfp.member_email_addresses.append(member["email"])
442
444
 
443
445
  yield rfp.dict()
446
+
447
+ @property
448
+ def file_permissions_schema(self) -> Dict[str, Any]:
449
+ return ResourceSchemaLoader(package_name_from_class(self.__class__)).get_schema("file_permissions")
450
+
451
+ @property
452
+ def identities_schema(self) -> Dict[str, Any]:
453
+ return ResourceSchemaLoader(package_name_from_class(self.__class__)).get_schema("identities")
@@ -1,11 +0,0 @@
1
- source_google_drive/__init__.py,sha256=SAgPIoGpjdHTY7mvf__A99FiElBh3WvdKSHLstg-BUE,134
2
- source_google_drive/exceptions.py,sha256=6sBxbdZhj0CARkctfBaNgGHB_GGcFUkY4cnMUWyOruM,268
3
- source_google_drive/run.py,sha256=5AQd906FbSGaNZj0udrr-VKmiSS4nsor7F7noMjsdi0,677
4
- source_google_drive/source.py,sha256=OyKTjPg80KR8yZiYiC3YSi6E6egothtAn3YAHAS6Q6A,2839
5
- source_google_drive/spec.py,sha256=-WkA2zGuQtf3G7uK8uq9BnimUlQh0s3vsqROmIHOgzI,4718
6
- source_google_drive/stream_reader.py,sha256=jKMibQGjpP-9raJ557TqbOg6iGVuPYv9vamStwXDOCQ,20176
7
- source_google_drive/utils.py,sha256=ewR-kBKLmtD-s7zqCfGECfzWYF43tpQdscAQIlUEkR8,1022
8
- airbyte_source_google_drive-0.2.0.dev202502052009.dist-info/METADATA,sha256=fiVV_jIGTrIB43tzlnCv3BAkJEbJqr8BYtB25-vIUBU,5536
9
- airbyte_source_google_drive-0.2.0.dev202502052009.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
10
- airbyte_source_google_drive-0.2.0.dev202502052009.dist-info/entry_points.txt,sha256=YgpJf0nA5Mn0B7YC9VOFI847vz1jI6U4q7BeLUOXa54,67
11
- airbyte_source_google_drive-0.2.0.dev202502052009.dist-info/RECORD,,