Skip to main content

A simple wrapper for Rclone as a Django storage

Project description

Django Rclone Storage

A simple wrapper for Rclone as a Django storage.

Usage

First, add these settings to your Django settings:

# The remote name in your rclone.conf
RCLONE_REMOTE = 'onedrive'
# Remote path where all the files will be uploaded. Default: /
RCLONE_REMOTE_ROOT = '/'
# Local path where your rclone.conf locates. If it's not set, rclone should use the default .conf file.
RCLONE_CONFIG_PATH = '/path/to/config'

And, set the default storage:

DEFAULT_FILE_STORAGE = 'rclonestorage.rclone_remote.RcloneRemoteStorage'

Or, you can just pass the settings to a RcloneRemoteStorage object and use it in the FileField:

file = models.FileField(
    storage=RcloneRemoteStorage(remote='remote',
                                root_path='/',
                                config_path='/path/to/config')
)

Reference

django-storages

python-rclone

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-rclone-storage-0.1.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_rclone_storage-0.1.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file django-rclone-storage-0.1.1.tar.gz.

File metadata

  • Download URL: django-rclone-storage-0.1.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.20.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.9

File hashes

Hashes for django-rclone-storage-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c7a6ecae7367949ff39ecc70e72287917d2c603a2e1c8596ac7795bf2e683baf
MD5 29a57200cc6d7d7a8bc0f57dd41b6902
BLAKE2b-256 154991230d8bbd75112a2d085c3253ec467015dc3762adf2c47abca1c7bca207

See more details on using hashes here.

File details

Details for the file django_rclone_storage-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: django_rclone_storage-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.20.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.9

File hashes

Hashes for django_rclone_storage-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 434e8df742fc435ba981aa02f2a8d148b80ed69bce7a166158f00c33f24444de
MD5 78e2b702a5176ea624062d3d768f5243
BLAKE2b-256 aeb32d9e45e09ac9fbeae146c233fcab95283255e79d11abf4e1bc9adec34852

See more details on using hashes here.

Supported by

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