Skip to main content
Topological (dependency) sorting and cycle-finding functions.

The topsort function is based on code posted on Usenet by Tim Peters.

Modifications:

* added doctests
* changed some parts to use current Python idioms
* added a topsort_levels version that ports items in each dependency level
into a sub-list
* added find_cycles to aid in cycle debugging

Release history Release notifications | RSS feed

This release

0.9

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page