SaveTemp

Builder to save temporary files

class disseminate.builders.save_temp.SaveTempFile(env, context, save_ext=None, **kwargs)

A Builder to save a string to a temporary file

Parameters
env: :obj:`.builders.Environment`

The build environment

parameters, argsTuple[pathlib.Path, str, tuple, list]

The input parameters (dependencies), including the string to save to the temporary outfilepath, for the build

outfilepathOptional[paths.TargetPath]

If specified, the path for the output file.

save_extstr

The extension for the saved temp file.

build(complete=False)

Run the build.

Parameters
completeOptional[bool]

If True, run the build until it has completed If False, start the build in the background.

Returns
statusstr

The current status of the build.

Note

  • This function will run the sub-builders.

  • Each builder is atomic

  • When running a build, not all of the builders might be called in the first build–for example, subsequent builders may rely on the results of previous builds. For this reason, builders should be used in conjunction with an environment to make sure a set of builds are completed or the build complete=True should be used.