--- id: creosote version: "5.2.0" license: unclear license_treatment: permissive maintenance: active --- # creosote — Identify unused dependencies and avoid a bloated virtual environment. License: permissive · Maintenance: active · Downloads: 860.7K/mo ## What it is and what it does Creosote is a command-line tool that identifies unused dependencies in your Python project by scanning source code for imports and comparing them against your declared dependencies. It works by parsing Python files for import statements, reading your dependency specification (pyproject.toml, requirements.txt, Poetry, Pipenv, or PDM formats), and determining which declared packages are never actually imported. The tool can also scan Django settings files for INSTALLED_APPS and MIDDLEWARE references. You run it as a standalone tool (typically via `uv tool install creosote` to avoid polluting your project's venv) and configure it with command-line arguments or a `[tool.creosote]` section in pyproject.toml. It supports multiple venv paths, source directories, and dependency sections, and can optionally scan for deferred imports inside functions and conditional blocks. The output identifies which dependencies are unused so you can remove them, reducing virtual environment bloat and dependency maintenance burden. Use it for: - Run in CI to catch developers forgetting to remove unused dependencies during refactorings - Audit a legacy project to identify and remove accumulated unused packages before deployment - Integrate with pre-commit hooks to prevent unused dependencies from being committed - Scan Django projects to verify all INSTALLED_APPS and MIDDLEWARE entries are actually used - Reduce noise from dependency update bots by removing packages that won't actually break anything if dropped ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Creosote scans your Python project's source code and dependency specifications to identify which declared dependencies are actually unused, helping you clean up bloated virtual environments. Yes. Creosote solves a real problem—unused dependencies create security and maintenance burden—with low friction (pure Python, six lightweight deps) and active maintenance. It supports multiple dependency formats and integrates well into CI/pre-commit workflows. No known vulnerabilities and permissive MIT license. Install as a standalone tool to keep your project venv clean. ## Install pip install creosote uv add creosote poetry add creosote ## Installing creosote Before you install: Low install friction with a pure Python wheel and six runtime dependencies. The project is actively maintained with a recent release and moderate popularity (top 5000 on PyPI), suggesting stable ongoing support. License in practice: Licensed under MIT (permissive), so you can use and modify creosote freely in both open-source and commercial projects without significant legal constraints. Quickstart: # Install in a separate venv uv tool install creosote # Run from your project root creosote --venv .venv --path src --deps-file pyproject.toml --section project.dependencies # Or configure in pyproject.toml: # [tool.creosote] # venvs = [".venv"] # paths = ["src"] # deps-file = "pyproject.toml" # sections = ["project.dependencies"] Requires Python 3.10 or later; you must have an activated virtual environment or site-packages folder path to scan, and a dependency specification file (pyproject.toml, requirements.txt, etc.) that creosote can parse. Verify before relying: - Whether importlib-based dynamic imports can be detected (documentation notes this as a known limitation) - Performance characteristics when scanning large codebases or complex dependency graphs - Accuracy of deferred import detection when enabled via --include-deferred flag ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 860.7K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags find unused dependencies, detect unused imports, clean up bloated venv, dependency audit tool, remove unused packages, dependency analyzer, venv cleanup, dependency-audit, ci-integration, venv-cleanup [View on SkillFed](https://skillfed.io/packages/creosote) · [View on PyPI](https://pypi.org/project/creosote/)