a Django storage backend using GCS JSON API
Project description
django-gapc-storage
django-gapc-storage is a Django storage backend for Google Cloud Storage using the JSON API through google-api-python-client.
Requirements
Django 1.8+
Settings
Set the GCS_BUCKET environment variable to the GCS bucket to be used by the storage backend.
Settings can be customized via the GPAC_STORAGE settings dict:
GPAC_STORAGE = { "allow_overwrite": False, "bucket": "my-bucket", "cache_control": "public, max-age=3600", "path_prefix": "", }
GPAC_STORAGE["allow_overwrite"]
Default: False
If True, the storage backend will overwrite an existing object with the same name.
GPAC_STORAGE["bucket"]
Default: os.environ["GCS_BUCKET"]
GPAC_STORAGE["cache_control"]
Default: public, max-age=3600
By default, public-readable objects on GCS have a cache duration of 60 minutes. Set cache_control to private, max-age=0 to disable public caching of objects saved by the storage backend.
GPAC_STORAGE["path_prefix"]
Default: ""
A prefix appended to the path of objects saved by the storage backend. For example, configuring path_prefix to media would save objects to my-bucket/media.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-gapc-storage-0.3.0.tar.gz
.
File metadata
- Download URL: django-gapc-storage-0.3.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c32319b8c868bb467855101273f4aec87c5ae8801e44e283d940a5c5384303e |
|
MD5 | 88b914bd50a98a310817bb408e676296 |
|
BLAKE2b-256 | 5b5cfd6872c9b6cba8059a1fa5dd1839b04c0c3339ccb7afb8116968031c0398 |
Provenance
File details
Details for the file django_gapc_storage-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_gapc_storage-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54ff59204b24a84a6f99d42b79195e4146ed762717d0d6939897420583350dac |
|
MD5 | 9b2f8d52f36a16b7d81d9568dfe37f48 |
|
BLAKE2b-256 | 60687b1baef8b7009f7ca45d1f8912344f499c2ee6ad6d8bb458a890e5bbb739 |