Skip to main content

django-filestorages

Django-getstorage is a tiny Python library for dealing with configurable Django storages.

It allows you to define a dictionary of file storage configurations in your settings and refer to them by name in your code.

It should be obsolete once Django ticket 26029 is resolved.

Installation

Use the package manager pip to install django-filestorages.

pip install django-filestorages

Usage

Wherever you need a storage, use the filestorages.get_storage function.

from filestorages import get_storage

file = models.FileField(storage=get_storage('some.configured.storage'))

In your settings, you can define your storages using dotted paths:

FILE_STORAGES = {
    'default': {
        'BACKEND': "django.core.files.storage.FileSystemStorage",
        'OPTIONS': {
            'location': '/path/to/the/files/',
            'base_url': '/files/',
        }
    },
    'some': {
        'BACKEND': 'other.backend.Storage',
        'OPTIONS': {
            'option': 'value',
        },
    },
    'some.configured': {
        'OPTIONS': {
            'second_option': True,
        },
    },
}

In this example get_storage('some.configured.storage') returns other.backend.Storage(option='value', second_option=True)

If no matching backend is found, FILE_STORAGES['default'] is used, falling back on DEFAULT_FILE_STORAGE if not set.

License

MIT

Metadata

Release files for django-filestorages 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-filestorages 0.1
File Size Uploaded Provenance
django-filestorages-0.1.tar.gz 2.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-filestorages 0.1
File Interpreter ABI Platform
django_filestorages-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.0 kB

Release files / django-filestorages-0.1.tar.gz

Download URL django-filestorages-0.1.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0fe6c352d48fd2ce70c76aef6dc33d9ece0e28c2fdc2c100aab762c753e010af
BLAKE2b-256 checksum
How to use checksums
f47f9fdfca1d1f8f796d3585dd87011d22ad3f6a03dc582a08dcc532257fc958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0b4

Release files / django_filestorages-0.1-py3-none-any.whl

Download URL django_filestorages-0.1-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53d1543314438fa91a63538e66fbb2860d547e3f56c0aa1548f34088ee4b0f79
BLAKE2b-256 checksum
How to use checksums
cb84ad26f495fee94b8e1a81309d5cd3055bb433e54a994e65f072950cc954d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0b4

Security for django-filestorages 0.1

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.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page