macaron.path_utils package

Submodules

macaron.path_utils.purl_based_path module

This module contains functions to manage PackageURL-based paths.

macaron.path_utils.purl_based_path.get_purl_based_dir(purl_type, purl_name, purl_namespace=None)

Return a directory path according to components of a PackageURL.

Parameters:
  • purl_type (str) – The type component of the PackageURL as string.

  • purl_name (str) – The name component of the PackageURL as string.

  • purl_namespace (str | None = None) – The namespace component of the PackageURL as string (optional).

Returns:

The directory path.

Return type:

str

Examples

>>> get_purl_based_dir(purl_type="maven", purl_name="macaron", purl_namespace="oracle")
'maven/oracle/macaron'