Registry / web-framework / django-npm

django-npm

JSON →
library1.0.1pypypiunverified

A Django staticfiles finder that uses npm. Integrates Node.js packages into Django's static file system by scanning node_modules directories. Current version: 1.0.1. Low maintenance, occasional updates for Django compatibility.

pip install django-npm
INSTALL
IMPORT
SIG · DJANGO-NPM
D
django-npm
web-frameworkpythonv1.0.1
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NpmFinder
from npm.finders import NpmFinder
from django_npm.finders import NpmFinder

Add 'django_npm' to INSTALLED_APPS and include NpmFinder in STATICFILES_FINDERS. Then run 'python manage.py collectstatic' to integrate npm packages.

INSTALLED_APPS = [ 'django_npm', # ... ] STATICFILES_FINDERS = [ 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'django_npm.finders.NpmFinder', ]
Debug
Known issues
gotchaNpmFinder must come after the default finders; otherwise, default finders may override npm static files, leading to missing assets.
fix
Place NpmFinder last in the STATICFILES_FINDERS list.
affects: all
gotchadjango-npm does not automatically install npm packages or run 'npm install'. You must ensure node_modules is populated in your project's static root or a discoverable location.
fix
Run 'npm install' in your project directory before 'collectstatic'.
affects: all
deprecatedPython 3.8 and lower are no longer supported. Requires Python >= 3.9.
fix
Upgrade Python to 3.9+.
affects: >=1.0.0
Upgrade
Version history
1.0.1latest on PyPI · released Apr 23, 2025
Audit
Dependencies
DjangorequiredStaticfiles integration required
Agent activity
4 hits · last 30 days
node
4
Resources
django-npm — pip install django-npm · libregistry