![]() |
FOSSology
4.6.0
Open Source License Compliance by Open Source Software
|

Public Member Functions | |
| def | __init__ (self, str sbom_file) |
| def | classify_components (self, str root_download_dir) |
| list[dict[str, Any]] | python_components (self) |
| list[dict[str, Any]] | npm_components (self) |
| list[dict[str, Any]] | php_components (self) |
| list[dict[str, Any]] | unsupported_components (self) |
Public Attributes | |
| sbom_data | |
| root_component_name | |
Private Member Functions | |
| str|None | _extract_type (self, str purl) |
Parser to classify each component based on it's type. Ex: If purl is pkg:pypi/django@1.11.1, it is a pypi package and should belong to python_components.
Definition at line 22 of file Parsers.py.
| def ScanDeps.Parsers.Parser.__init__ | ( | self, | |
| str | sbom_file | ||
| ) |
Initialize components list and load the sbom_data.
Args:
sbom_file: str | Path to sbom file
Definition at line 29 of file Parsers.py.
|
private |
Extracts the package type from the purl.
Example purl: pkg:pypi/django@1.11.1
The type here is 'pypi'.
Args:
purl: str | Purl of the package to scan
Return:
purl_type: str | Type of component or None
Definition at line 79 of file Parsers.py.
| def ScanDeps.Parsers.Parser.classify_components | ( | self, | |
| str | root_download_dir | ||
| ) |
Classify components based on it's type :param root_download_dir: Download dir prefix. Will be used to create download dir.
Definition at line 53 of file Parsers.py.