{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/7"}],"enrichment":{"capability":"Adds Common Table Expressions (CTE) support to Django's ORM, enabling recursive and hierarchical queries that the standard Django QuerySet API does not provide.","skillfed_tags":["django-orm","sql-cte","hierarchical-queries"],"use_cases":["Build recursive queries to traverse tree structures (org charts, file hierarchies, comment threads) without multiple database round-trips.","Implement hierarchical permission or role checks by walking up or down a parent-child relationship in a single query.","Aggregate data across multiple levels of a hierarchy in one pass.","Deduplicate or filter complex result sets by defining intermediate named result sets within a single query.","Optimize queries that would otherwise require multiple separate database calls or expensive in-memory processing."],"what_it_does":"django-cte extends Django's ORM with support for Common Table Expressions, a SQL feature that allows you to define temporary named result sets within a query. This is essential for recursive queries (like traversing organizational hierarchies or comment threads) and complex multi-step aggregations that the standard Django QuerySet API cannot express directly.\n\nThe package works by providing a With() helper to define CTE clauses and integrating them into Django querysets. It sits on top of django as a single runtime dependency and maintains compatibility with modern Django versions (4.2, 5.1, 5.2) and Python 3.9 and later. The project is actively maintained, has no known security vulnerabilities, and is used by a moderate but steady audience (top 5000 on PyPI).","worth_installing":"Yes, if you need recursive or hierarchical queries in Django. The package is stable (Production/Stable status), actively maintained, has no security issues, and adds a single lightweight dependency. Install it only if your application actually requires CTE functionality; standard Django querysets are sufficient for most CRUD operations."},"id":"django-cte","links":{"html":"https://skillfed.io/packages/django-cte","md":"https://skillfed.io/packages/django-cte.md","pypi":"https://pypi.org/project/django-cte/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-02-05","license_spdx":"BSD-3-Clause","license_treatment":"permissive","name":"django-cte","python_support":"supports_current","summary":"Common Table Expressions (CTE) for Django"},"popularity":{"monthly_downloads":1052054,"position":4440,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"3.0.0"}
