PyDrive2 documentation¶
PyDrive2 2.0 is a Python client for Google Drive API v3 and an
fsspec-compatible filesystem for Google Drive. Use the Quickstart
to sign in, upload a file, and list a folder. For path-based access with
gdrive:// URLs, see fsspec filesystem.
Installation¶
PyDrive2 requires Python 3.11 or newer.
python -m pip install PyDrive2
To use the fsspec filesystem, install the optional dependencies.
python -m pip install 'PyDrive2[fsspec]'
The DataChain team maintains PyDrive2. Find the source on GitHub, the package on PyPI, and the release history on GitHub.
Guides and reference¶
- Quickstart
- Authentication
- File management made easy
- Upload a new file
- Delete, Trash and un-Trash files
- Update file metadata
- Download file metadata from file ID
- Handling special metadata
- Permissions
- Get files by complex queries
- List revisions
- Import a file into Google Workspace
- Upload and update file content
- Upload data as bytes in memory buffer
- Upload file to a specific folder
- Download file content
- Abusive files
- File listing made easy
- fsspec filesystem
- Upgrade to PyDrive2 2.0
- Python API reference