spython.main.parse package

Submodules

spython.main.parse.converters module

spython.main.parse.docker module

spython.main.parse.environment module

spython.main.parse.recipe module

class spython.main.parse.recipe.Recipe(recipe=None, layer=1)[source]

Bases: object

a recipe includes an environment, labels, runscript or command, and install sequence. This object is interacted with by a Parser (intended to popualte the recipe with content) and a Writer (intended to write a recipe to file). The parsers and writers are located in parsers.py, and writers.py, respectively. The user is also free to use the recipe class to build recipes.

Parameters:
  • recipe (the original recipe file, parsed by the subclass either) – DockerParser or SingularityParser
  • layer (the count of the layer, for human readability)
json()[source]

return a dictionary version of the recipe, intended to be parsed or printed as json.

Returns: a dictionary of attributes including cmd, comments,
entrypoint, environ, files, install, labels, ports, test, volumes, and workdir, organized by layer for multistage builds.

spython.main.parse.singularity module

Module contents