Detection Process¶
- File location
Bundled implementation:
source/client/python/scan.pyCluster implementation:
cluster/app/source/python/scan.pycluster/app/source/python/utils/py
Bundled Implementation¶
-
scan.process(entry: Entry)¶ - Availability
bundled implementation
Process extracted files with detection APIs.
- Parameters
entry (Entry) – File to be processed.
-
scan.make_env(api: API)¶ - Availability
bundled implementation
Generate a dictionary of environment variables based on API entry.
-
scan.make_cwd(api: API, entry: Optional[Entry] = None, example: bool = False)¶ - Availability
bundled implementation
Generate the working directory of API entry.
-
scan.init(api: API, cwd: str, env: Dict[str, Any], mime: str, uuid: str)¶ - Availability
bundled implementation
Run the initialisation commands of API entry.
- Parameters
- Returns
Exit code (
const.EXIT_SUCCESSorconst.EXIT_FAILURE).- Return type
-
scan.run(command: Union[str, List[str]], cwd: str = None, env: Optional[Dict[str, Any]] = None, mime: str = 'example', file: str = 'unknown')¶ - Availability
bundled implementation
Run command with provided settings.
- Parameters
- Returns
Exit code (
const.EXIT_SUCCESSorconst.EXIT_FAILURE).- Return type
-
scan.issue(mime: str)¶ - Availability
bundled implementation
Called when the execution of API commands failed.
- Parameters
mime (str) – MIME type.
- Returns
Exit code (
const.EXIT_FAILURE).- Return type
- Raises
APIError – If
mimeisexample.APIWarning – If
mimeis NOTexample.
-
exception
scan.APIWarning¶ - Bases
Warning
- Availability
bundled implementation
Warn if API execution failed.
-
exception
scan.APIError¶ - Bases
Exception
- Availability
bundled implementation
Error if API execution failed.
Cluster Implementation¶
-
process.process(entry: Entry)¶ - Availability
cluster implementation
See also
-
process.make_env(api: API)¶ - Availability
cluster implementation
See also
-
process.make_cwd(api: API, entry: Optional[Entry] = None, example: bool = False)¶ - Availability
cluster implementation
See also
-
process.init(api: API, cwd: str, env: Dict[str, Any], mime: str, uuid: str)¶ - Availability
cluster implementation
See also
-
process.run(command: Union[str, List[str]], cwd: str = None, env: Optional[Dict[str, Any]] = None, mime: str = 'example', file: str = 'unknown')¶ - Availability
cluster implementation
See also
-
exception
utils.APIWarning¶ - Bases
Warning
- Availability
cluster implementation
See also
-
exception
utils.APIError¶ - Bases
Exception
- Availability
cluster implementation
See also