Skip to main content

Storage implementation for Django that interacts with Google Drive

Project description

Tests status Linter status django-googledrive-storage on Pypi Documentation Status

This is a Django Storage implementation that uses Google Drive as backend for storing data.

Quick start

Installation

pip install django-googledrive-storage

Setup

INSTALLED_APPS = (
     ...,
     'django.contrib.staticfiles',
     'gdstorage'
 )

Set the environment variable GOOGLE_DRIVE_STORAGE_JSON_KEY_FILE_CONTENTS or path file in the settings.py: GOOGLE_DRIVE_STORAGE_JSON_KEY_FILE.

Optional set GOOGLE_DRIVE_STORAGE_MEDIA_ROOT in the settings.py

Usage example

from gdstorage.storage import GoogleDriveStorage

# Define Google Drive Storage
gd_storage = GoogleDriveStorage()

...

class Map(models.Model):
    id = models.AutoField( primary_key=True)
    map_name = models.CharField(max_length=200)
    map_data = models.FileField(upload_to='maps', storage=gd_storage)

Documentation and Installation instructions

Documentation and installation instructions can be found at Read The Docs.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

File details

Details for the file private_django_googledrive_storage-1.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for private_django_googledrive_storage-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31c6bcaef2a396f58487321c724e604bb5abd06489be311340741a9fa4745c3d
MD5 a60ad358e4828b362020d13ff0ab7741
BLAKE2b-256 24f8c7d068ef197855d35ec8b84cea9f5e80d584c71c218410e6dca3868a274c

See more details on using hashes here.

Supported by

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