Skip to main content

Supercharge collectstatic for remote storages

Project description

Supercollect

Install

pip install supercollect or poetry add supercollect

Add supercollect to INSTALLED_APPS before django.contrib.staticfiles

INSTALLED_APPS = [
    ...
    "supercollect",
    "django.contrib.staticfiles",
    ...
]

Set STATIC_ROOT setting

Usage

python manage.py collectstatic --turbo

How

This package is built around a very simple idea. Perform collectstatic in a temporary local storage and upload all files in parallel after it's finished. Out of the box this should support any remote storage as well as manifest storages.

def collect(self):
    if collect_super_fast:
        self.storage = use_temporary_file_system_storage() # super.simple

    files_collected = super().collect() # super.collect
    
    if not collect_super_fast:
        return files_collected # super.pluggable

    self.storage = real_s3_storage
    multithreaded_upload() # super.fast

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

supercollect-1.0.5.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

supercollect-1.0.5-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file supercollect-1.0.5.tar.gz.

File metadata

  • Download URL: supercollect-1.0.5.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for supercollect-1.0.5.tar.gz
Algorithm Hash digest
SHA256 a8539eb5081da2f3c4f7e8d2462f414563b164a79147db5a899cf5c9655aed8a
MD5 5da1767c5e1dad611f463577f99cc149
BLAKE2b-256 ee140f355d9aaec3b40c30ce4e2b795e0c32d0661736f0a9033d15698f9db0e2

See more details on using hashes here.

File details

Details for the file supercollect-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: supercollect-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for supercollect-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bceda6a3445bf8267c79abfd8c5ddb590357370573c0cc02b32b0972138abbdb
MD5 f90057079b5796916a25e2261e15b5b7
BLAKE2b-256 a1618e8815e79f6ce13156ce9b6241a4cecd40b8eb2fbaec78403066c1f45558

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