Django Google API Python Client Storage Backend
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 GAPC_STORAGE settings dict:
GAPC_STORAGE = {
"allow_overwrite": False,
"bucket": "my-bucket",
"cache_control": "public, max-age=3600",
"num_retries": 0,
"path_prefix": "",
}
GAPC_STORAGE["allow_overwrite"]
Default: False
If True, the storage backend will overwrite an existing object with the same name.
GAPC_STORAGE["bucket"]
Default: os.environ["GCS_BUCKET"]
GAPC_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.
GAPC_STORAGE["num_retries"]
Default: 0
Passed to the supported methods on the underlying google-api-python-client client which will retry 500 error responses with randomized exponential backoff.
For more information, see the google-api-python-client documentation.
GAPC_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.
Metadata
Release files for django-gapc-storage 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-gapc-storage-0.5.2.tar.gz | 4.6 kB | Without provenance | Details for django-gapc-storage-0.5.2.tar.gz |
Release files / django-gapc-storage-0.5.2.tar.gz
| Download URL | django-gapc-storage-0.5.2.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ba517d3967d90ae206b66309a800ac5d56a25412f53281d0a85173abd56bd74
|
|
BLAKE2b-256 checksum How to use checksums |
b5921fa9d5412688c18c1c808d6b21c2c7a6fd38519b37a460d45e5e9263356a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.6
|
Security for django-gapc-storage 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.