$npx skillfedfor your agent

toposort

Implements a topological sort algorithm.

With conditionsPyPI Python ModulesReleased Feb 202313.0M downloads / moApache License Version 2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — toposort-1.10-py3-none-any.whl
v1.10 · released 2023-02-25

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.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with no runtime dependencies.
  • Package is marked abandoned (last release 2023-02-25, 1266 days ago), so expect no active maintenance or bug fixes.

License · maintenance · safety

Apache License Version 2.0 (permissive) — Apache License 2.0 (permissive) allows use in most projects without significant restrictions.

last release 2023-02-25 (1266 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 13,017,745 downloads/mo, #1,297 on PyPI

Verify before relying

from toposort import toposort, toposort_flatten

data = {2: {11}, 9: {11, 8, 10}, 10: {11, 3}, 11: {7, 5}, 8: {7, 3}}
result = list(toposort(data))
flat = toposort_flatten(data)
  • Whether the abandoned status affects reliability for stable, well-tested algorithms like topological sort.
  • Performance characteristics on large graphs or whether there are known limitations in the implementation.
Same gist for agents: .md · .json

What it is and 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—nodes with no remaining dependencies come first. If a circular dependency exists, it raises CyclicDependencyError with details about the cycle.

The 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.

Use it for

  • 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.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

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.

Install

toposort on PyPI

Before you install

Low install friction with no runtime dependencies. Package is marked abandoned (last release 2023-02-25, 1266 days ago), so expect no active maintenance or bug fixes.

License in practice

Apache License 2.0 (permissive) allows use in most projects without significant restrictions.

Quickstart

from toposort import toposort, toposort_flatten

data = {2: {11}, 9: {11, 8, 10}, 10: {11, 3}, 11: {7, 5}, 8: {7, 3}}
result = list(toposort(data))
flat = toposort_flatten(data)

Verify before relying

  • Whether the abandoned status affects reliability for stable, well-tested algorithms like topological sort.
  • Performance characteristics on large graphs or whether there are known limitations in the implementation.

Package facts

LicenseApache License Version 2.0 permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAbandoned 1,266 days since the last release
First released
Downloads13,017,745 / month, #1,297 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Evidence: toposort-1.10-py3-none-any.whl

Tags

Capabilities
topological sortdependency orderingdirected acyclic graphtoposort algorithmprocess dependencies in ordercircular dependency detectionnode ordering
Topics
graph-algorithmsdependency-resolution

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “dependency ordering”

  • toposortImplements topological sorting of directed acyclic graphs, ordering…
  • colcon-corecolcon-core is a command-line tool that orchestrates building,…
  • importlabImportlab infers Python import dependencies and builds a dependency…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also bigtree · cyclic · types-toposort · altgraph · Dijkstar · objectgraph · asciidag · anastruct · grandalf · natsort