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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq_sdk_google_drive
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Google Drive wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq-sdk-google-drive
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Google Drive wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -2,7 +2,7 @@ from setuptools import setup, find_namespace_packages
2
2
 
3
3
  setup(
4
4
  name='brynq_sdk_google_drive',
5
- version='1.0.0',
5
+ version='1.0.1',
6
6
  description='Google Drive wrapper from BrynQ',
7
7
  long_description='Groogle Drive wrapper from BrynQ',
8
8
  author='BrynQ',