{"id":21064,"library":"collectfasta","title":"Collectfasta","description":"A faster collectstatic for Django, compatible with Django >=3.2 and Python >=3.10. Version 3.3.3 is the latest stable release. The project is actively maintained with frequent releases.","status":"active","version":"3.3.3","language":"python","source_language":"en","source_url":"https://github.com/jasongi/collectfasta/","tags":["django","collectstatic","staticfiles","performance"],"install":[{"cmd":"pip install collectfasta","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required as it is a Django application.","package":"django","optional":false},{"reason":"Often used together for cloud storage backends.","package":"django-storages","optional":true}],"imports":[{"note":"No common incorrect import; the main class is typically used in Django settings.","symbol":"Collectfasta","correct":"from collectfasta import Collectfasta"}],"quickstart":{"code":"# settings.py\nINSTALLED_APPS = [\n    # ...\n    'collectfasta',\n]\n\n# For S3 (using django-storages)\nSTORAGES = {\n    \"default\": {\n        \"BACKEND\": \"storages.backends.s3.S3Storage\",\n    },\n    \"staticfiles\": {\n        \"BACKEND\": \"storages.backends.s3.S3Storage\",\n    },\n}\n\n# Optional: enable two-pass strategy for performance\nCOLLECTFASTA_STRATEGY = \"collectfasta.strategies.filesystem.FileSystemStrategy\"\n# or use in-memory:\n# COLLECTFASTA_STRATEGY = \"collectfasta.strategies.memory.MemoryStrategy\"","lang":"python","description":"Basic setup: add collectfasta to INSTALLED_APPS and configure your static files storage."},"warnings":[{"fix":"Explicitly set COLLECTFASTA_STRATEGY in settings if you need the old single-pass strategy.","message":"In version 3.3.0, the default strategy changed from the original single-pass to a two-pass strategy. If you rely on the old behavior, set COLLECTFASTA_STRATEGY to 'collectfasta.strategies.singlepass.SinglePassStrategy'.","severity":"breaking","affected_versions":">=3.3.0"},{"fix":"Ensure your cache backend's MAX_ENTRIES is set appropriately (e.g., for LocMemCache, default is 300; adjust based on your static file count).","message":"The MAX_ENTRIES cache setting must be set properly for the two-pass strategy. Incorrect values can cause excessive memory or I/O.","severity":"gotcha","affected_versions":">=3.3.3"},{"fix":"Use strategy parameters instead of global COLLECTFASTA_THREADS.","message":"The setting 'COLLECTFASTA_THREADS' is deprecated in favor of the strategy-specific configuration.","severity":"deprecated","affected_versions":">=3.2.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Set COLLECTFASTA_STRATEGY to a valid strategy path, e.g., 'collectfasta.strategies.filesystem.FileSystemStrategy'.","cause":"COLLECTFASTA_STRATEGY is not set or is incorrect.","error":"django.core.exceptions.ImproperlyConfigured: The COLLECTFASTA_STRATEGY setting must be a dotted path to a strategy class."},{"fix":"Ensure STORAGES['staticfiles'] is configured correctly with a proper BACKEND.","cause":"Possibly due to missing or misconfigured storage backend for static files.","error":"TypeError: 'NoneType' object is not iterable"},{"fix":"Import correctly: from collectfasta import Collectfasta. Or upgrade: pip install --upgrade collectfasta.","cause":"Incorrect import or outdated version.","error":"AttributeError: module 'collectfasta' has no attribute 'Collectfasta'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}