Trees and Graphs
Even in relational databases, Django can easily do hierarchical data models. http://science.nasa.gov/ is a good example of what can be done.
Search & Filter
| Package | django-mptt | django-treebeard | django-treenode | django-tree-queries | django-neomodel | django-ltree | django-postgresql-dag | django-ltree-2 | django-fast-treenode |
|---|---|---|---|---|---|---|---|---|---|
|
Description
|
Utilities for implementing a
modified pre-order traversal tree in django. |
Efficient tree implementations
for Django |
:deciduous_tree: probably the
best abstract model/admin for your tree based stuff. |
Adjacency-list trees for
Django using recursive common table expressions. Supports Postgre… |
Neomodel plugin for Django
|
An ltree extension
implementation to support hierarchical tree-like data using the native … |
Directed Acyclic Graphs with a
variety of methods for both Nodes and Edges, and multiple e… |
Postgres LTree support for
django |
A hybrid, high-performance,
open-source framework for working with large trees in Django |
|
Category
|
App | App | App | Other | App | App | App | App | App |
|
Using This
|
113
|
27
|
3
|
2
|
1
|
0
|
2
|
0
|
0
|
|
Python 3?
|
Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
|
Dev Status
|
Production/Stable | Production/Stable | Production/Stable | Unknown | Beta | Beta | Production/Stable | Production/Stable | Production/Stable |
|
Version (PyPI)
|
0.18.0 | 5.0.5 | 0.24.0 | 0.24.0 | 0.2.0 | 0.6.0 | 2026.2.3 | 0.1.13 | 3.2.10 |
|
Stars
|
2,971 | 1,198 | 798 | 510 | 310 | 75 | 53 | 48 | 36 |
|
Forks
|
465 | 224 | 38 | 32 | 61 | 19 | 6 | 6 | 5 |
|
Commits
|
|
|
|
|
|
|
|
|
|
|
Updated
|
26 Aug 2025 | 26 Apr 2026 | 17 Apr 2026 | 25 Mar 2026 | 27 Jan 2025 | 11 Dec 2025 | 19 Feb 2026 | 28 Apr 2026 | 9 Mar 2026 |
|
License
|
MIT-License | Apache-2.0 | Custom | BSD-3-Clause | MIT | MIT | Apache-2.0 | MIT | Custom |
|
Links
|
|||||||||
|
Feature Comparison
(click cells to edit)
|
|||||||||
|
Type: Adjacency list
|
|
|
|
|
—
|
—
|
—
|
—
|
|
|
Type: Nested set
|
|
|
—
|
|
—
|
—
|
—
|
—
|
|
|
Type: Materialized path
|
|
|
|
|
—
|
—
|
—
|
—
|
V 3.x |
|
Uses native graph storage
|
|
|
—
|
|
—
|
—
|
—
|
—
|
|
|
Admin contrib support
|
|
|
|
|
—
|
—
|
—
|
—
|
|
|
Dependency Free
|
|
|
|
|
—
|
—
|
NetworkX for exports, PostgreSQL
|
—
|
|
|
Type: Directed Acyclic Graph
|
|
|
—
|
|
—
|
—
|
|
—
|
|
|
Drop-in
|
|
|
—
|
|
—
|
—
|
—
|
—
|
|
|
Type: Closure Table
|
—
|
—
|
|
—
|
—
|
—
|
—
|
—
|
V 2.x |
|
Type: Edge list
|
—
|
—
|
—
|
—
|
—
|
—
|
|
—
|
—
|
|
API-First support
|
—
|
—
|
—
|
—
|
—
|
—
|
—
|
—
|
|
Utilities for implementing a modified pre-order traversal tree in django.
Efficient tree implementations for Django
:deciduous_tree: probably the best abstract model/admin for your tree based stuff.
Adjacency-list trees for Django using recursive common table expressions. Supports PostgreSQL, sqlite, MySQL and MariaDB.
Neomodel plugin for Django
An ltree extension implementation to support hierarchical tree-like data using the native Postgres extension ltree in django models
Directed Acyclic Graphs with a variety of methods for both Nodes and Edges, and multiple exports (NetworkX, Pandas, etc). This project is the foundation for a commercial product, so expect regular improvements. PR's and other contributions are welcomed.
Postgres LTree support for django
A hybrid, high-performance, open-source framework for working with large trees in Django
V 3.x
V 2.x
Showing 9 of 17 packages in this grid.
Features Being Compared
Type: Adjacency list
Type: Nested set
Type: Materialized path
Uses native graph storage
Admin contrib support
Django Admin contrib integration.
Dependency Free
Thirdparty depedency required for package.
Type: Directed Acyclic Graph
Drop-in
Doesn't require building models using utils provided within package. Works with previously created models.
Type: Closure Table
Type: Edge list
Is the graph or tree stored in the database as a list of edges from a parent node to a child node?
API-First support
API-First support means the backend is built to provide a complete, standalone API, enabling external systems or frontends to interact without relying on internal UI logic.