No single tool. The closest Knip-style tool is chokkin (MIT, first released June 2026, still early); otherwise use Vulture or Skylos for unused code, deptry or FawltyDeps for unused dependencies, and Ruff F401 for imports. chokkin describes itself as "a Knip-like experience for Python" and reports unused files, dependencies and public symbols.
Knip itself is the standard for JavaScript and TypeScript: in its own words, it "finds and fixes unused dependencies, exports and files." Below, each Knip check is mapped to Python, with real output from four tools on the same small project.
Knip's checks, mapped to Python
| Knip (JS/TS) | The Python question | What covers it |
|---|---|---|
| Unused files | Is this module reachable from an entry point? | chokkin (CHK001). Vulture and Skylos report the module's unused functions, not the file |
| Unused exports | Is this function, class or method used anywhere? | Vulture, Skylos, deadcode; chokkin for public symbols used outside their module |
| Unused dependencies | Is this package in pyproject.toml ever imported? | deptry, FawltyDeps, chokkin, Skylos SKY-U005 |
| Missing dependencies | Is an imported package undeclared? | deptry, FawltyDeps, chokkin; Skylos SKY-D223 (as an "unverified" note) |
--fix | Can the tool remove it? | Ruff (imports, per file), skylos clean (imports and functions), chokkin --fix (manifest fixes), deadcode --fix |
Python packaging makes some Knip checks less central. There are no barrel files or exports maps, and __all__ is optional, so "unused export" usually just means "unused function or class".
Tested on one project
The project has a console-script entry point (app.main:run) and these dead parts:
app/old_helpers.py, a module nothing imports (with two functions);unused_report()inapp/main.py;Report.render_pdf(), a method nothing calls;OldExporter, a class nothing uses;requests, declared inpyproject.tomland never imported.
| Tool | Unused module | Unused function, method, class | Unused dependency | Reported wrongly |
|---|---|---|---|---|
| chokkin 0.7.3, no config | No | 2 of 3 (missed render_pdf) | Yes | None |
chokkin 0.7.3, mode = "app" + entry point | Yes | 2 of 3 | Yes | None |
| Vulture 2.16 | Its 2 functions | 3 of 3 | — | run, the console-script entry point |
| deptry 0.25.1, project deps installed | — | — | Yes | None |
| deptry 0.25.1, project deps not installed | — | — | Yes | yaml "missing" and pyyaml "unused" |
| FawltyDeps 0.20.0, project deps installed | — | — | Yes | None |
Skylos 4.47.1, --select SKY-U001,SKY-U004,SKY-U005 | Its 2 functions | 3 of 3 | Yes | None |
chokkin, after adding mode = "app" and entry = ["app/main.py"] under [tool.chokkin] (header lines removed):
$ chokkin
Unused files 1
app/old_helpers.py app/old_helpers.py file `app/old_helpers.py` is not reachable from any entry root
Unused dependencies 1
requests pyproject.toml declared in project.dependencies[0], no reachable import, config, or binary usage found
Unused exports 2
app.main:unused_report app/main.py:12 public function `unused_report` in `app.main` is not referenced from outside the module
app.report:OldExporter app/report.py:12 public class `OldExporter` in `app.report` is not referenced from outside the module
Summary: 4 issues
Without that config it guessed "library" mode, where every public module counts as API, and didn't report the unused file.
Skylos:
$ skylos . --select SKY-U001,SKY-U004,SKY-U005 --format concise
app/main.py:12 SKY-U001 unused function: unused_report
app/old_helpers.py:1 SKY-U001 unused function: slugify
app/old_helpers.py:5 SKY-U001 unused function: truncate
app/report.py:8 SKY-U001 unused function: Report.render_pdf
app/report.py:12 SKY-U004 unused class: OldExporter
pyproject.toml:5 SKY-U005 Declared dependency 'requests' appears unused. No matching import found in any Python file.
deptry, run where the project's dependencies are installed (colour codes and footer removed):
$ deptry .
pyproject.toml: DEP002 'requests' defined as a dependency but not used in the codebase
Found 1 dependency issue.
In an environment without them, deptry assumed the module for pyyaml is called pyyaml, so it reported yaml as missing and pyyaml as unused. Its output says how to fix that: install the packages, or set package_module_name_map.
FawltyDeps, in the same environment:
$ fawltydeps
These dependencies appear to be unused (i.e. not imported):
- 'requests'
For a more verbose report re-run with the `--detailed` option.
What Skylos does not do here
- It doesn't report a Python module that nothing imports. For
app/old_helpers.pyit reported the two functions, not the file. Only chokkin, in app mode, reported the file. - It doesn't check
package.jsondependencies on TypeScript projects, which Knip does. - Its SKY-D223 note is a prompt, not a verdict. Import names often differ from distribution names, so imports it can't match to a declared dependency are reported as "unverified", not "missing".
Which to use
- Unused modules and a Knip-style report: try chokkin, and set
modeandentryfor applications. It is early (version 0.7.3 on 10 Oct 2026, one GitHub star), so check its findings before you act on them. - Unused functions, classes and methods: Vulture or Skylos. Both found all three here. Skylos also knows common framework entry points; Vulture needs configuration for them (see Vulture false positives). Ruff can't do this; see Does Ruff detect dead code?
- Unused and missing dependencies: deptry or FawltyDeps (MIT, last release June 2025), in the project's environment. Skylos's SKY-U005 found the unused one, and it doesn't report tools that are run rather than imported:
pytestandgunicornadded to the samepyproject.tomlweren't reported. - Hallucinated packages in AI-written code: Skylos reports a dependency that doesn't exist on PyPI as SKY-D222; see hallucinated imports in AI-written code.
If your repo is TypeScript or mixed
TypeScript or JavaScript only: use Knip. It's ISC-licensed, widely used (about 12.4k GitHub stars on 10 Oct 2026), and it checks things Skylos doesn't, such as unused package.json dependencies. In a TypeScript demo, Skylos reported the unused file and the unused functions but said nothing about two unused npm dependencies:
$ skylos . --format concise
src/legacy.ts:1 SKY-U001 unused function: oldHelper
src/text.ts:5 SKY-U001 unused function: titleCase
src/legacy.ts:1 SKY-E003 Unused TypeScript/JavaScript file (not imported by any other file)
Mixed Python and TypeScript: Knip on the TypeScript packages; a dead-code tool and a dependency check on the Python side. Skylos can scan both languages in one CI job, but it doesn't replace Knip's dependency checks.
A starting setup for Python
pip install skylos deptry
skylos . # unused functions, classes, methods, imports, variables
skylos . --select SKY-U005 # unused declared dependencies
deptry . # unused, missing and transitive dependencies
skylos clean . --dry-run # preview removing unused imports and functions
Add --strict to make the Skylos scan exit 1 when it finds anything, for pre-commit or CI.