Google Drive
Installation
# you can use a Conda environment
pip install --extra-index-url https://oauth2accesstoken:$(gcloud auth print-access-token)@glsdk.gdplabs.id/gen-ai-internal/simple/ "gllm-docproc"# you can use a Conda environment
$token = (gcloud auth print-access-token)
pip install --extra-index-url "https://oauth2accesstoken:$token@glsdk.gdplabs.id/gen-ai-internal/simple/" "gllm-docproc"# you can use a Conda environment
FOR /F "tokens=*" %T IN ('gcloud auth print-access-token') DO SET TOKEN=%T
pip install --extra-index-url "https://oauth2accesstoken:%TOKEN%@glsdk.gdplabs.id/gen-ai-internal/simple/" "gllm-docproc"Basic Usage
1
from gllm_docproc.downloader import GoogleDriveDownloader
source = "https://drive.google.com/file/d/1a2b3c4d5e6f7g8h9i0j/view?usp=sharing"
output_path = "./downloader/output"
# Initialize downloader
downloader = GoogleDriveDownloader(
api_key="YOUR_GL_CONNECTORS_API_KEY",
identifier="YOUR_GL_CONNECTORS_IDENTIFIER",
secret="YOUR_GL_CONNECTORS_SECRET",
)
# Download file
downloaded_files = downloader.download(source, output_path)
print(f"Downloaded files: {downloaded_files}")2
python main.py3
Last updated
Was this helpful?