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.1.0.tar.gz (3.4 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.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for supercollect-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b3f97c0dc741bdfd8554dee83e6475b27d0d09a110bea59f80d62fd2f8d7ac63
MD5 fee7af7c5fb82e83316702e42b5cb742
BLAKE2b-256 3e2b3cfa6eb15f693757563e15acdffcf4d0e7dbc98a45f6a162f835f6825049

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for supercollect-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf1182be1daa752d0b924b1bea22b1a8724ade1c153f5dd97d296a0ca77dbb6e
MD5 54d9658c8f73bf2091f301b2fc5da09a
BLAKE2b-256 9e55b69175970fcc12972e25c4c6e7805ef02b85ae287f7682ab77db591e7cce

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