mbu-dev-shared-components 0.0.47__tar.gz → 0.0.48__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.
- {mbu_dev_shared_components-0.0.47/mbu_dev_shared_components.egg-info → mbu_dev_shared_components-0.0.48}/PKG-INFO +1 -1
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/os2forms/documents.py +8 -4
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48/mbu_dev_shared_components.egg-info}/PKG-INFO +1 -1
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/.gitignore +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/LICENSE +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/README.md +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/getorganized/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/getorganized/auth.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/getorganized/cases.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/getorganized/contacts.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/getorganized/documents.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/getorganized/objects.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/google/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/google/api/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/google/api/auth.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/google/workspace/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/google/workspace/alerts.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/office365/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/office365/excel/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/office365/excel/excel_reader.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/office365/sharepoint_api/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/office365/sharepoint_api/files.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/os2forms/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/os2forms/forms.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/sap/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/sap/create_invoice.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/utils/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/utils/db_stored_procedure_executor.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components/utils/json_handler.py +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components.egg-info/SOURCES.txt +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components.egg-info/dependency_links.txt +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components.egg-info/requires.txt +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/mbu_dev_shared_components.egg-info/top_level.txt +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/pyproject.toml +0 -0
- {mbu_dev_shared_components-0.0.47 → mbu_dev_shared_components-0.0.48}/setup.cfg +0 -0
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import requests
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
def download_file_bytes(url: str,
|
|
5
|
+
def download_file_bytes(url: str, os2_api_key: str) -> bytes:
|
|
6
6
|
"""Downloads the content of a file from a specified URL, appending an API key to the URL for authorization.
|
|
7
7
|
The API key is retrieved from an environment variable 'OS2ApiKey'.
|
|
8
8
|
|
|
9
9
|
Parameters:
|
|
10
10
|
url (str): The URL from which the file will be downloaded.
|
|
11
|
-
|
|
11
|
+
os2_api_key (str): The API-key for OS2Forms api.
|
|
12
12
|
|
|
13
13
|
Returns:
|
|
14
14
|
bytes: The content of the file as a byte stream.
|
|
@@ -16,7 +16,11 @@ def download_file_bytes(url: str, api_key: str) -> bytes:
|
|
|
16
16
|
Raises:
|
|
17
17
|
requests.RequestException: If the HTTP request fails for any reason.
|
|
18
18
|
"""
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
headers = {
|
|
20
|
+
'Content-Type': 'application/json',
|
|
21
|
+
'api-key': f'{os2_api_key}'
|
|
22
|
+
}
|
|
23
|
+
response = requests.request(method='GET', url=url, headers=headers, timeout=60)
|
|
24
|
+
response.raise_for_status()
|
|
21
25
|
|
|
22
26
|
return response.content
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|