splitgraph.splitfile package


splitgraph.splitfile.execution module

Functions for executing Splitfiles.

splitgraph.splitfile.execution.execute_commands(commands, params=None, output=None, output_base='00000000000000000000000000000000')

Executes a series of Splitfile commands.

  • commands – A string with the raw Splitfile.

  • params – A dictionary of parameters to be applied to the Splitfile (${PARAM} is replaced with the specified parameter value).

  • output – Output repository to execute the Splitfile against.

  • output_base – If not None, a revision that gets checked out for all Splitfile actions to be committed on top of it.

splitgraph.splitfile.execution.getrandbits(k) → x. Generates an int with k random bits.
splitgraph.splitfile.execution.rebuild_image(image, source_replacement)

Recreates the Splitfile used to create a given image and reruns it, replacing its dependencies with a different set of versions.

  • image – Image object

  • source_replacement – A map that specifies replacement images/tags for repositories that the image depends on

Module contents

Splitfile interpreter: a set of tools on top of the core Splitgraph versioning and image management to give the user a Dockerfile-like experience for building Splitgraph images (caching, consistent hashing, a declarative language).