zut.graph.topological_sort

zut.graph.topological_sort(source: Mapping[T, None | T | Iterable[T]]) list[T]

Perform a topological sort of dependencies.

  • source: dictionnary associating keys to list of dependencies

  • returns a list of keys, sorted with dependencies first