CandidateInput

class toasty.pipeline.CandidateInput[source]

Bases: ABC

An abstract base class representing an image from one of our sources. If it has not been processed before, we will fetch its data and queue it for processing.

Methods Summary

get_unique_id()

Get an ID for this image that will be unique in its toasty.pipeline.ImageSource.

save(stream)

Serialize candidate information for future processing

Methods Documentation

abstract get_unique_id()[source]

Get an ID for this image that will be unique in its toasty.pipeline.ImageSource.

Returns:
An identifier as a string. Should be limited to path-friendly
characters, i.e. ASCII without spaces.
abstract save(stream)[source]

Serialize candidate information for future processing

Parameters:
streamwriteable stream accepting bytes

The stream into which the candidate information should be serialized.

Returns:
None.
Raises:
May raise toasty.pipeline.NotActionableError if it turns out that this
candidate is not one that can be imported into WWT.