proj_flow.project.interact

The proj_flow.project.interact provides initialization context through user prompts.

class proj_flow.project.interact.ContextSetup(dest_path: str | None, interactive: bool, simple: bool, load: str | None)

Holds the setup for current context gathering.

dest_path: str | None

Provides path name for project, in case it should differ from current directory.

interactive: bool

Selects, if the initialization process is done through prompts, or not.

simple: bool

Do no post-processing and key expanding of the resulting context

load: str | None

If this setup is non-interactive, use contents of this file for answers. If any given answer is missing, the default answer would be taken.

proj_flow.project.interact.get_context(setup: ContextSetup, project: str | None, rt: Runtime)

Prompts user to provide details of newly-crated project. If interactive is true, however, this functions skips the prompts and chooses all the default answers.

Parameters:
  • setup – Selects, if the initialization process is done through prompts, or not and how to answer any given question.

  • project – Alows to select questions for any given language.

  • rt – Runtime with config loaded in.

Returns:

Dictionary with answers to all interactive settings and switches.