searcch.importer.util.retrieve package

Module contents

exception searcch.importer.util.retrieve.GitError[source]

Bases: Exception

class searcch.importer.util.retrieve.RetrievedFile(artifact_file, destdir, raw_path, unpacked=None, unpacked_path=None, mime_type=None, mime_desc=None)[source]

Bases: object

__init__(artifact_file, destdir, raw_path, unpacked=None, unpacked_path=None, mime_type=None, mime_desc=None)[source]

Initialize self. See help(type(self)) for accurate signature.

artifact
artifact_file
destdir
mime_desc
mime_type
path
raw_path
set_unpacked_path(path)[source]
class searcch.importer.util.retrieve.Retriever(config)[source]

Bases: object

Helper class to retrieve ArtifactFiles into temp storage, while respecting resource limits. Understands http(s) and git repos. ArtifactFiles are stored in <destdir>/raw . If unspecified, <destdir> defaults to <tmpdir>/artifact.id/artifact_file.id .

__init__(config)[source]

Initialize self. See help(type(self)) for accurate signature.

config
retrieve(artifact_file, artifact, destdir=None, unpack=True)[source]