Skip to main content

Custom storage backend tailored for a proprietary cloud storage service.

Project description

Django Cloud Storage

Django Cloud Storage is a Python package that provides a custom storage backend designed for seamless integration with proprietary cloud storage service.

Installation

pip install django-cloud-storage

Configuration

In your Django settings file, set the following values:

CLOUD_STORAGE_URL = 'https://your-cloud-service.com'
CLOUD_STORAGE_API_TOKEN = 'your-api-token'
CLOUD_STORAGE_PROJECT_ALIAS = 'myproject'

Usage

To integrate the Cloud Storage with a Django model, follow these steps:

  • Import the required models and CloudStorage:

    from django_cloud_storage.storage import CloudStorage
    
  • Define your Django model, using CloudStorage as the storage backend for a FileField:

    class MyModel(models.Model):
        file_field = models.FileField(storage=CloudStorage)
    
        def __str__(self):
            return self.file_field.name
    

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-cloud-storage-1.0.5.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

django_cloud_storage-1.0.5-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page