Allow easy integration with Google storage for Django projects


License
MIT
Install
pip install django-gstorage==0.0.1

Documentation

django-gstorage

PyPi page Travis CI Status Coverage status ReadTheDocs License MIT

This library is intended to be a 'plug-and-play' replacement for django.core.files.storage.FileSystemStorage but reading and writing files from Google storage. So there are two goals -

  • It should be possible to use this library in projects already using local filesystem but which want to start using Google storage. In this case, we read from Google storage but if that fails, read from local filesystem and also update Google storage.

  • Make it simpler to use newer features of Google storage like encrypting files with sensitive information

    order_pdf = FileField(encrypted=True)

Examples

Using the module to upload some files

>>> from gstorage.bucket import Bucket

>>> bucket = Bucket.get_default()
>>> bucket.copydir('share/storage/2016/10/01')