brynq-sdk-google-drive 1.0.0__tar.gz → 1.0.1__tar.gz
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.
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/PKG-INFO +1 -1
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/brynq_sdk_google_drive/google_drive.py +3 -2
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/brynq_sdk_google_drive.egg-info/PKG-INFO +1 -1
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/setup.py +1 -1
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/brynq_sdk_google_drive/__init__.py +0 -0
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/brynq_sdk_google_drive.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/brynq_sdk_google_drive.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/brynq_sdk_google_drive.egg-info/not-zip-safe +0 -0
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/brynq_sdk_google_drive.egg-info/requires.txt +0 -0
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/brynq_sdk_google_drive.egg-info/top_level.txt +0 -0
- {brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/setup.cfg +0 -0
{brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/brynq_sdk_google_drive/google_drive.py
RENAMED
|
@@ -23,6 +23,7 @@ class GoogleDrive(BrynQ):
|
|
|
23
23
|
print(f"credentials: {credentials}")
|
|
24
24
|
self.access_token = credentials['auth']['access_token']
|
|
25
25
|
self.brynq_system_id = credentials['id']
|
|
26
|
+
self.timeout = 3600
|
|
26
27
|
|
|
27
28
|
def _get_google_drive_headers(self):
|
|
28
29
|
access_token = self.refresh_system_credential(system='google-drive', system_id=self.brynq_system_id)['access_token']
|
|
@@ -45,7 +46,7 @@ class GoogleDrive(BrynQ):
|
|
|
45
46
|
if drive_id:
|
|
46
47
|
params['driveId'] = drive_id
|
|
47
48
|
params['corpora'] = 'drive'
|
|
48
|
-
response = requests.get(url=url, headers=headers, params=params)
|
|
49
|
+
response = requests.get(url=url, headers=headers, params=params, timeout=self.timeout)
|
|
49
50
|
response.raise_for_status()
|
|
50
51
|
return response
|
|
51
52
|
|
|
@@ -81,7 +82,7 @@ class GoogleDrive(BrynQ):
|
|
|
81
82
|
"""
|
|
82
83
|
url = f'{self.base_url}files/{file_id}/export?mimeType={mime_type}'
|
|
83
84
|
headers = self._get_google_drive_headers()
|
|
84
|
-
response = requests.get(url=url, headers=headers)
|
|
85
|
+
response = requests.get(url=url, headers=headers, timeout=self.timeout)
|
|
85
86
|
response.raise_for_status()
|
|
86
87
|
with open(local_file_path, 'wb') as f:
|
|
87
88
|
f.write(response.content)
|
{brynq_sdk_google_drive-1.0.0 → brynq_sdk_google_drive-1.0.1}/brynq_sdk_google_drive/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|