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.4.tar.gz (4.1 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.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: supercollect-1.0.4.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.11.7 Linux/5.15.133.1-microsoft-standard-WSL2

File hashes

Hashes for supercollect-1.0.4.tar.gz
Algorithm Hash digest
SHA256 5d9f7e0b30fad32587477778b4899fd1d41cc492943ccbbdca7d81e7c4659212
MD5 6103cd3948a55bf621491ee33735e0b1
BLAKE2b-256 c780a5cd45618450a7785fda27bb9f709d41bba71aed55f2f21494271cc82aba

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for supercollect-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ddccdc4e12bb789092dda702e94722efd8f3cd330ba8895d3781ab2d98b93f24
MD5 6ab5b965fa7fdfc18c6b781591ef4bd1
BLAKE2b-256 5d7782cbd9f2cd9166bf9a367a47062bcb07fbbef9f79cf2b2e4a204256eda4a

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