@@ -68,7 +68,12 @@ from dependency_resolver import Orchestrator, HostExecutor, DockerExecutor, Outp
6868
6969# Host system analysis with custom settings
7070executor = HostExecutor()
71- orchestrator = Orchestrator(debug = True , skip_system_scope = True , skip_hash_collection = True )
71+ orchestrator = Orchestrator(
72+ debug = True ,
73+ skip_system_scope = True ,
74+ skip_hash_collection = True ,
75+ selected_detectors = " pip,npm" # Only analyze Python and Node.js dependencies
76+ )
7277dependencies = orchestrator.resolve_dependencies(executor)
7378
7479# Format output
@@ -84,7 +89,12 @@ from dependency_resolver import Orchestrator, DockerExecutor, OutputFormatter
8489# Docker container analysis
8590container_id = " nginx"
8691executor = DockerExecutor(container_id)
87- orchestrator = Orchestrator(debug = False , skip_system_scope = False , skip_hash_collection = False )
92+ orchestrator = Orchestrator(
93+ debug = False ,
94+ skip_system_scope = False ,
95+ skip_hash_collection = False ,
96+ selected_detectors = " dpkg,docker-info" # Analyze system packages and container info only
97+ )
8898
8999dependencies = orchestrator.resolve_dependencies(executor, working_dir = " /app" )
90100
@@ -119,10 +129,30 @@ orchestrator = Orchestrator(
119129 debug = True , # Enable debug output
120130 skip_system_scope = False , # Skip system-wide package managers
121131 venv_path = " /path/to/venv" , # Specify Python virtual environment path
122- skip_hash_collection = False # Skip hash collection for improved performance
132+ skip_hash_collection = False , # Skip hash collection for improved performance
133+ selected_detectors = " pip,npm" # Use only specific detectors
123134)
124135```
125136
137+ ### Detector Selection
138+
139+ Control which package managers are analyzed by specifying the ` selected_detectors ` parameter:
140+
141+ ``` python
142+ from dependency_resolver import Orchestrator, HostExecutor
143+
144+ # Use only Python pip detector
145+ orchestrator = Orchestrator(selected_detectors = " pip" )
146+
147+ # Use multiple specific detectors
148+ orchestrator = Orchestrator(selected_detectors = " pip,npm,maven" )
149+
150+ # Use all detectors (default behavior)
151+ orchestrator = Orchestrator(selected_detectors = None )
152+ ```
153+
154+ ** Available detectors:** ` pip ` , ` npm ` , ` dpkg ` , ` apk ` , ` maven ` , ` docker-info `
155+
126156### Executor Options
127157
128158``` python
0 commit comments