{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/3"}],"enrichment":{"capability":"Implements topological sorting of directed acyclic graphs, ordering nodes so dependencies are processed before dependents.","skillfed_tags":["graph-algorithms","dependency-resolution"],"use_cases":["Determine build order for interdependent software modules or packages.","Schedule task execution respecting prerequisite constraints in workflow systems.","Resolve import or initialization order in complex codebases with circular-dependency detection.","Order database migrations or schema changes based on foreign-key dependencies.","Compute execution order for computation graphs in data pipelines."],"what_it_does":"toposort is a pure Python implementation of the topological sorting algorithm. It takes a dictionary where each key is a node and its value is a set of nodes it depends on, then returns an iterator of sets representing valid processing orders\u2014nodes with no remaining dependencies come first. If a circular dependency exists, it raises CyclicDependencyError with details about the cycle.\n\nThe package is straightforward and self-contained, with no external runtime dependencies. It supports both granular iteration (toposort) and flattened output (toposort_flatten), making it suitable for build systems, task scheduling, and any workflow requiring dependency resolution. The implementation handles arbitrary hashable node types, not just integers.","worth_installing":"Yes, if you need a simple, dependency-free topological sort. The algorithm is stable and well-tested (Production/Stable status), and the abandoned maintenance status poses minimal risk for a mature, narrow-scope library. Use it for straightforward dependency ordering; if you need advanced graph algorithms or active support, consider alternatives."},"id":"toposort","links":{"html":"https://skillfed.io/packages/toposort","md":"https://skillfed.io/packages/toposort.md","pypi":"https://pypi.org/project/toposort/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2023-02-25","license_spdx":null,"license_treatment":"permissive","name":"toposort","python_support":"unspecified","summary":"Implements a topological sort algorithm."},"popularity":{"monthly_downloads":13017745,"position":1297,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.10"}
