Registry / devops / dvc-gdrive

dvc-gdrive

JSON →
library3.0.1pypypi✓ verified 81d ago

gdrive storage plugin for DVC (Data Version Control) enabling Google Drive as a remote storage backend. Current version 3.0.1, release cadence is irregular (follows DVC releases). Requires Python >=3.8.

pip install dvc-gdrive
INSTALL
IMPORT
SIG · DVC-GDRIVE
D
dvc-gdrive
devopspythonv3.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GDriveFileSystem
from dvc_gdrive import GDriveFileSystem
import dvc.gdrive
FileSystem
from dvc_gdrive import FileSystem
import dvc.gdrive
ConfigError
from dvc_gdrive import ConfigError
import dvc.gdrive

Setup a GDrive remote and push data. Authentication via OAuth2 is required; first run opens a browser for authorization.

import os import dvc.api # Ensure dvc-gdrive is installed: pip install dvc-gdrive # Configure a GDrive remote (requires authentication) os.system('dvc remote add -d myremote gdrive://<folder_id>') os.system('dvc remote modify myremote gdrive_client_id <your_client_id>') os.system('dvc remote modify myremote gdrive_client_secret <your_client_secret>') # Push data os.system('dvc push -r myremote')
Debug
Known issues
gotchaLarge files: Google Drive has a 5 TB file size limit and a 750 GB daily upload quota per user. Exceeding quota will cause upload failures.
fix
Split large files or use chunked uploads via dvc remote modify <name> chunk_size.
affects: all
breakingAuthentication requires a valid OAuth2 client ID and secret from Google Cloud Console. Without these, dvc push/pull fails with authentication errors.
fix
Create OAuth2 credentials in Google Cloud Console and set them via `dvc remote modify <name> gdrive_client_id` and `gdrive_client_secret`.
affects: >=2.0.0
deprecatedOlder versions (pre 2.0) used PyDrive; now requires pydrive2. Incompatible with DVC >=2.0.
fix
Upgrade to dvc-gdrive >=2.0.0 and re-authenticate.
affects: <2.0.0
Upgrade
Version history
3.0.1latest on PyPI · released Jan 4, 2024
Audit
Dependencies
dvcrequiredCore dependency; dvc-gdrive is a plugin for DVC.
pydrive2requiredGoogle Drive API client
Agent activity
7 hits · last 30 days
node
6
Resources
dvc-gdrive — pip install dvc-gdrive · libregistry