Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

[RFE] support a _common.yaml #504

@mathstuf

Description

@mathstuf

Multiple endpoints might want a common configuration settings, so it would be nice to have a _common.yaml file be loaded and then per-endpoint configurations be (recursively) merged in.

Sketch for recursive merging:

def merge(base, *args):
    out = base.copy()
    for arg in args:
        for key, value in arg.items():
            if key not in out:
                out[key] = value
            elif type(key) == list:
                if type(out[key]) == list:
                    out[key] += value
                else:
                    raise
            elif type(key) == dict:
                if type(out[key]) == dict:
                    out[key] = merge(out[key], value)
                else:
                    raise
            else:
                out[key] = value
    return out

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions