Get Context
get_context() -> dict:
Section titled “get_context() -> dict:”get the context that was used to render the original template, returns an empty dictionary if no angreal.toml is found
import angreal
# Get the context as a dictionarycontext = angreal.get_context()
# Example: Accessing values from the contextif context: print("Project name:", context.get("project_name", "Not set")) print("Version:", context.get("version", "Not set"))
# Example: Setting a new value in the contextcontext["new_key"] = "new_value"print("Updated context:", context)