Django Storage
Supported backends
- MinIO
- Backblaze B2
Installation
pip install django-object-storage
Usage
BackBlazeB2
Reads configuration from Django settings when not provided explicitly:
# For Django 4.2+
STORAGE_B2_APP_KEY = ""
STORAGE_B2_ACCOUNT_ID = ""
STORAGE_B2_BUCKET_NAME = ""
STORAGE_B2_BUCKET_ID = ""
STORAGES = {
"default": {
"BACKEND": "django_object_storage.b2.B2Storage",
},
}
# Or for Django 4.2+ with options
STORAGES = {
"default": {
"BACKEND": "django_object_storage.b2.B2Storage",
"OPTIONS": {
"account_id": "",
"app_key": "",
"bucket_name": "",
"bucket_id": "",
},
},
}
# For Django versions below 4.2
DEFAULT_FILE_STORAGE = "django_object_storage.b2.B2Storage"
MinIO
Reads configuration from Django settings when not provided explicitly:
# For Django 4.2+
STORAGE_MINIO_BUCKET_NAME = ""
STORAGE_MINIO_ENDPOINT = "" # s3.example.com
STORAGE_MINIO_ACCESS_KEY = ""
STORAGE_MINIO_SECRET_KEY = ""
STORAGE_MINIO_SECURE = True # True or False
STORAGES = {
"default": {
"BACKEND": "django_object_storage.minio.MinIOStorage",
},
}
# Or for Django 4.2+ with options
STORAGES = {
"default": {
"BACKEND": "django_object_storage.minio.MinIOStorage",
"OPTIONS": {
"bucket_name": "",
"endpoint": "", # s3.example.com
"access_key": "",
"secret_key": "",
"secure": True, # True or False
},
},
}
# For Django versions below 4.2
DEFAULT_FILE_STORAGE = "django_object_storage.minio.MinIOStorage"
Auto Static Files Storage
- DEBUG = True -> StaticFilesStorage
- DEBUG = False -> ManifestStaticFilesStorage
# For Django 4.2+
STORAGES = {
"default": {
"BACKEND": "django_object_storage.staticfiles.StaticFilesStorage",
},
}
# For Django versions below 4.2
DEFAULT_FILE_STORAGE = "django_object_storage.staticfiles.StaticFilesStorage"
Metadata
Release files for django-object-storage 0.2.0
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 | |
|---|---|---|---|---|
| django_object_storage-0.2.0.tar.gz | 6.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_object_storage-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / django_object_storage-0.2.0.tar.gz
| Download URL | django_object_storage-0.2.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca710c346c9cde849a6a021130024145d6efb41cead3d74a5f76876a81764f07
|
|
BLAKE2b-256 checksum How to use checksums |
3db0b0057e40d729804ed3c92c993dd2eb3f3eb2f7f686b9acbf16947e8abb6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / django_object_storage-0.2.0-py3-none-any.whl
| Download URL | django_object_storage-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cc277d83dac0ffb237f47ce8f9052a8ffa937ce56deabaac5241221e8900cc7
|
|
BLAKE2b-256 checksum How to use checksums |
d5912850271140ce0319fcc6848eacb137143a9e150bb451897b1cb0959a863b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for django-object-storage 0.2.0
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.