1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.
Django CTE Trees is an experimental implementation of Adjacency-List trees using PostgreSQL Common Table Expressions (CTE). Its aim is to completely hide the management of tree structure, as well as explore the issues related to including CTE in the Django ORM.
Although handling tree structure in a transparent way is a desirable characteristic for many applications, the currently known limitations of including CTE (see below) will be a show-stopper for many other applications. Unless you know beforehand that these limitations will not affect your application, this module is not suitable for you, and you should use an actively managed tree structure (such as django-mptt <https://github.com/django-mptt/django-mptt/> or django-treebeard <http://code.tabo.pe/django-treebeard/>).
Characteristics:
Simple: inheriting from an abstract node model is sufficient to obtain tree functionality for any Model.
Seamless: does not use RawQuerySet, so queries using CTE can be combined with normal Django queries, and won’t confuse the SQLCompiler or other QuerySets, including using multiple databases.
Self-contained: tree nodes can be manipulated without worrying about maintaining tree structure in the database.
Single query: all tree traversal operations can be performed through a single query, including children, siblings, ancestors, roots, and descendants.
Flexible ordering: supports (a subset of) normal Django ordering as well as ordering on tree structure information, including depth and path, in DFS and BFS orders.
Multiple delete semantics: supports Pharaoh, Grandmother, and Monarchy deletion patterns.
Code: unit tests, documentation, comments.
Known limitations:
Virtual fields not usable in external queries: it is not yet possible to use the virtual fields which describe the tree structure (depth, path, and ordering information) in queries other than directly on the CTE Nodes. Consequently, you cannot order on these fields any Model other than the CTE Nodes themselves. See the technical notes for details.
Cannot merge queries with OR: because CTE relies on custom WHERE clauses added through extra, the bitwise OR operator cannot be used with query composition.
Cannot use new Nodes without loading: immediately after creating a CTE Node, it must be read from the database if you need to use its tree structure (depth, path, and ordering information).
Cannot order descending: you cannot order on structure fields (depth, path) or additional normal fields combined with structure fields in descending order.
Metadata
Release files for django-cte-trees 0.9.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
File added late
1 file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-cte-trees-0.9.2.tar.gz | 23.1 kB | Without provenance | Details |
Release files / django-cte-trees-0.9.2.tar.gz
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | django-cte-trees-0.9.2.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80ca40ef47df43e1644e0071b72bad566414995256cde7330855135b23a8fb7a
|
|
BLAKE2b-256 checksum How to use checksums |
54edf44322f7c4de8e079a6e2971fe723b18c616c6c011bf890c676e8a25b34c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-cte-trees 0.9.2
Upload timing
File added late
1 file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.