--- id: dijkstar version: "2.6.0" license: MIT license_treatment: permissive maintenance: active --- # Dijkstar — Dijkstra/A* License: permissive · Maintenance: active · Downloads: 76.9K/mo ## What it is and what it does Dijkstar is a graph pathfinding library that implements Dijkstra's algorithm for finding shortest paths between nodes in a weighted graph. It can operate in single-destination mode (halting when a target is reached) or compute paths from a source to all reachable nodes. The library supports optional cost functions to compute edge weights dynamically during traversal and optional heuristic functions to convert the algorithm to A* search, steering it toward a destination rather than exploring uniformly. The package provides a simple Graph class for building networks by adding weighted edges, and a find_path function that returns path information including the sequence of nodes, individual edge costs, and total cost. It also supports graph serialization via pickle for saving and loading. With only six as a runtime dependency and low install friction, it integrates easily into projects needing graph algorithms. Use it for: - Route planning in navigation systems or street networks with dynamic cost adjustments for street names or traffic conditions - Game pathfinding using A* heuristics to find efficient paths for NPCs or agents toward goals - Network routing or resource allocation problems where you need optimal paths between nodes with weighted connections - Analyzing connectivity in social networks or knowledge graphs to find shortest relationship chains - Robotics motion planning to compute efficient paths through obstacle-aware weighted environments ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Dijkstar implements Dijkstra's shortest-path algorithm and A* search, finding optimal paths in weighted graphs with optional cost and heuristic functions. Yes. Dijkstar is a mature, actively maintained implementation of a foundational algorithm with no known vulnerabilities, permissive licensing, and minimal dependencies. Install it if you need Dijkstra or A* pathfinding in a graph. The last release was 2021-03-30; verify that Python version support meets your requirements before adopting. ## Install pip install dijkstar uv add dijkstar poetry add dijkstar ## Installing Dijkstar Before you install: Low friction install with a single lightweight dependency (six). The package is actively maintained with recent commits and has been stable since its early releases. License in practice: MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations. Quickstart: from dijkstar import Graph, find_path graph = Graph() graph.add_edge(1, 2, 110) graph.add_edge(2, 3, 125) graph.add_edge(3, 4, 108) result = find_path(graph, 1, 4) print(result.total_cost) Verify before relying: - Whether the package supports modern Python versions beyond 3.9 (classifiers list ends there; last release was 2021-03-30) - Performance characteristics or scalability limits for large graphs - Whether heuristic function API is documented for A* use cases ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 76.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags dijkstra shortest path algorithm, A* pathfinding graph, weighted graph traversal, single-source shortest paths, graph path finding, dijkstra a-star implementation, graph-algorithms, pathfinding [View on SkillFed](https://skillfed.io/packages/dijkstar) · [View on PyPI](https://pypi.org/project/dijkstar/)