Skip to main content

A package that helps resolve relative Google Drive paths to absolute system paths that refer to the Google drive mount location.

Project description

gdrive_resolver

Different systems may mount Google Drive to different locations. This package automatically finds the mounted Google Drive directory so that it can resolve Google Drive relative paths to absolute system paths.

Example Usage:

from src import GoogleDriveResolver

gdrive_resolver = GoogleDriveResolver()
absolute_path = gdrive_resolver.resolve('my/path/in/google/drive/myfile.txt')
print(absolute_path)
"/path/to/mounted/google/drive/my/path/in/google/drive/myfile.txt"

Development

git clone
cd src
# Create a virtual environment, then:
pip install -r requirements.txt

Testing

pytest tests

Troubleshooting

If GoogleDriveResolver cannot resolve your Google Drive path, it may not be searching at a sufficient depth. You can increase the depth by passing the max_depth parameter to the constructor.

from src import GoogleDriveResolver

absolute_path = GoogleDriveResolver(max_depth=10).resolve('my/path/in/google/drive/myfile.txt')
print(absolute_path)

If it still cannot resolve your path, please ensure that your Google Drive is mounted, accessible, and that it is called "Google Drive" or "GoogleDrive" in your system.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gdriveresolver-0.0.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gdriveresolver-0.0.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file gdriveresolver-0.0.1.tar.gz.

File metadata

  • Download URL: gdriveresolver-0.0.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for gdriveresolver-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5ad470b7e1b0286e5e1d15985e7e1a15fb377fc1eb4a6044c5bd2487e3f1e52f
MD5 3c1fed9ab9f0adbf03baa1ad5468c4f7
BLAKE2b-256 1723dae95cc11f2a8e371f314658eaf63b9ddb1adbfe654a3e1b3eecc943554e

See more details on using hashes here.

File details

Details for the file gdriveresolver-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gdriveresolver-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for gdriveresolver-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8b2d18cee600dcc133b8826b2bacea9512f319c88ad656218ded639e37e39c47
MD5 5566ca3b62dde708d0cbd6e26b8825b0
BLAKE2b-256 da841b8b57951831b4f68b7e504ba8f45af1a89c23fc7b9bc760c96b59a05e27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page