Allow easy integration with Google storage for Django projects
Project description
django-gstorage
===============
.. image:: https://img.shields.io/pypi/v/django-gstorage.svg
:alt: PyPi page
:target: https://pypi.python.org/pypi/django-gstorage
.. image:: https://travis-ci.org/fyndiq/django-gstorage.svg?branch=master
:alt: Travis CI Status
:target: https://travis-ci.org/fyndiq/django-gstorage
.. image:: https://coveralls.io/repos/github/fyndiq/django-gstorage/badge.svg?branch=master
:alt: Coverage status
:target: https://coveralls.io/github/fyndiq/django-gstorage?branch=master
.. image:: https://readthedocs.org/projects/django-gstorage/badge/?version=latest&style=flat
:alt: ReadTheDocs
:target: https://django-gstorage.readthedocs.io/en/latest/
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:alt: License MIT
:target: https://github.com/fyndiq/django-gstorage/blob/master/LICENSE
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
.. code-block:: python
order_pdf = FileField(encrypted=True)
Examples
++++++++
Using the module to upload some files
.. code-block:: python
>>> from gstorage.bucket import Bucket
>>> bucket = Bucket.get_default()
>>> bucket.copydir('share/storage/2016/10/01')
.. :changelog:
Release history
---------------
0.6.0-dev (2016-11-02)
++++++++++++++++++++++
- :class:`gstorage.storage.Storage`` implements the interface expected from
:class:`django.core.files.storage.Storage`. The only **supported interface**
at this point is ``storage._save``, and other methods are experimental.
- Support Python 3.4 for new Django (1.9 and 1.10)
- Added an example project showing use of django-gstorage
0.4.1 (2016-10-30)
++++++++++++++++++
- Updated docstrings to sphinx style
- Added documentation for gstorage.utils
0.4.0 (2016-10-30)
++++++++++++++++++
**Features**
- Refactored tests and added seperate test files for each module.
- Updated documentation on readthedocs.io to include section about
bucket.
0.3.0 (2016-10-28)
++++++++++++++++++
**Features**
- ``gstorage.bucket.Bucket.get_default`` allowing easy access to
default bucket.
- ``gstorage.bucket.Bucket.copydir`` allowing easy upload of files
to Google cloud.
===============
.. image:: https://img.shields.io/pypi/v/django-gstorage.svg
:alt: PyPi page
:target: https://pypi.python.org/pypi/django-gstorage
.. image:: https://travis-ci.org/fyndiq/django-gstorage.svg?branch=master
:alt: Travis CI Status
:target: https://travis-ci.org/fyndiq/django-gstorage
.. image:: https://coveralls.io/repos/github/fyndiq/django-gstorage/badge.svg?branch=master
:alt: Coverage status
:target: https://coveralls.io/github/fyndiq/django-gstorage?branch=master
.. image:: https://readthedocs.org/projects/django-gstorage/badge/?version=latest&style=flat
:alt: ReadTheDocs
:target: https://django-gstorage.readthedocs.io/en/latest/
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:alt: License MIT
:target: https://github.com/fyndiq/django-gstorage/blob/master/LICENSE
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
.. code-block:: python
order_pdf = FileField(encrypted=True)
Examples
++++++++
Using the module to upload some files
.. code-block:: python
>>> from gstorage.bucket import Bucket
>>> bucket = Bucket.get_default()
>>> bucket.copydir('share/storage/2016/10/01')
.. :changelog:
Release history
---------------
0.6.0-dev (2016-11-02)
++++++++++++++++++++++
- :class:`gstorage.storage.Storage`` implements the interface expected from
:class:`django.core.files.storage.Storage`. The only **supported interface**
at this point is ``storage._save``, and other methods are experimental.
- Support Python 3.4 for new Django (1.9 and 1.10)
- Added an example project showing use of django-gstorage
0.4.1 (2016-10-30)
++++++++++++++++++
- Updated docstrings to sphinx style
- Added documentation for gstorage.utils
0.4.0 (2016-10-30)
++++++++++++++++++
**Features**
- Refactored tests and added seperate test files for each module.
- Updated documentation on readthedocs.io to include section about
bucket.
0.3.0 (2016-10-28)
++++++++++++++++++
**Features**
- ``gstorage.bucket.Bucket.get_default`` allowing easy access to
default bucket.
- ``gstorage.bucket.Bucket.copydir`` allowing easy upload of files
to Google cloud.
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
django-gstorage-0.5.0.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for django_gstorage-0.5.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35e3221ef1efc48076883e4b97cc72244366afdea7c62b28d50bbf3aa837f22c |
|
MD5 | e5a04c52431bbdae82d9e95888a8f10c |
|
BLAKE2b-256 | 79ddd66467e1be9bb43e17ce09504145ab52cd313bf9863f2c52da8c5b374d06 |