Skip to main content
def get_contexts(
    project: Optional[str] = None,
    *,
    prefix: Optional[str] = None,
    api_key: Optional[str] = None,
) -> Dict[str, str]:

source code

Gets all contexts associated with a project, with the corresponding prefix. Arguments:
  • project - Name of the project the contexts belong to.
  • prefix - Prefix of the contexts to get (optional filter).
  • api_key - If specified, unify API key to be used. Defaults to the value in the
Returns: A dictionary mapping context names to their descriptions. Note: This function returns only context names and descriptions. To get full context details including foreign_keys, unique_keys, auto_counting, and other configuration, use get_context() for individual contexts. Example: contexts = get_contexts(project=“my_project”)