Welcome to pyartifacts’ documentation!¶
-
class
pyartifacts.ArtifactSource(source_type: str, provides: List[pyartifacts.artifact.SourceProvide] = None, supported_os: List[str] = None)¶ Abstract base class for artifact source definitions
-
class
pyartifacts.ArtifactDefinition(name: str, sources: List[pyartifacts.artifact.ArtifactSource], labels: List[str] = None, supported_os: List[str] = None)¶ Base class for artifacts
-
class
pyartifacts.ArtifactGroupSource(names: List[str], supported_os: List[str] = None)¶ ARTIFACT_GROUP
-
class
pyartifacts.ArtifactCommandSource(cmd: str, args: List[str] = None, provides: List[pyartifacts.artifact.SourceProvide] = None, supported_os: List[str] = None)¶ COMMAND
-
class
pyartifacts.ArtifactRegistryValueSource(key_value_pairs: List[Dict[str, str]], provides: List[pyartifacts.artifact.SourceProvide] = None, supported_os: List[str] = None)¶ REGISTRY_VALUE
-
class
pyartifacts.ArtifactWMISource(query: str, base_object: str = None, provides: List[pyartifacts.artifact.SourceProvide] = None, supported_os: List[str] = None)¶ WMI
-
class
pyartifacts.ArtifactFilesystemSource(source_type: str, paths: List[str], separator: str = None, provides: List[pyartifacts.artifact.SourceProvide] = None, supported_os: List[str] = None)¶ DIRECTORY, FILE and PATH
-
class
pyartifacts.ArtifactRegistryKeySource(keys: List[str], provides: List[pyartifacts.artifact.SourceProvide] = None, supported_os: List[str] = None)¶ REGISTRY_KEY
-
class
pyartifacts.KnowledgeBase(artifacts: Dict[str, ArtifactDefinition])¶ Class to collect resolved variables and manage their dependencies
-
get_value(key: str, resolve_callback: Callable[[ArtifactSource], Iterable[str]]) → Iterable[str]¶ Retrieve a value for a variable. In case the value is not yet available, this will trigger evaluation of the variable. To facilitate this, a callback must be provided that can be used to resolve another ArtifactSource to (text) values. The text value is expected to be
- For REGISTRY_KEY, the key path(s)
- For REGISTRY_VALUE, the string representation of the value(s) indicated
- For PATH and DIRECTORY, the file system path(s)
- For FILE, the content of the file(s) in one ‘
- ‘-separated string per source
- In any case, the value(s) will be cached for further use before returning to the caller.
-