Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Common Table Expressions with Django

Build Status PyPI version

Installation

pip install django-cte

Documentation

The django-cte documentation shows how to use Common Table Expressions with the Django ORM.

Running tests

cd django-cte
uv sync

pytest
ruff check

# To run tests against postgres
psql -U username -h localhost -p 5432 -c 'create database django_cte;'
export PG_DB_SETTINGS='{
    "ENGINE":"django.db.backends.postgresql_psycopg2",
    "NAME":"django_cte",
    "USER":"username",
    "PASSWORD":"password",
    "HOST":"localhost",
    "PORT":"5432"}'

# WARNING pytest will delete the test_django_cte database if it exists!
DB_SETTINGS="$PG_DB_SETTINGS" pytest

All feature and bug contributions are expected to be covered by tests.

Publishing a new verison to PyPI

Push a new tag to Github using the format vX.Y.Z where X.Y.Z matches the version in __init__.py.

A new version is published to https://test.pypi.org/p/django-cte on every push to the main branch.

Publishing is automated with Github Actions.

Release files for django-cte 3.0.0.dev20260709201911

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-cte 3.0.0.dev20260709201911
File Size Uploaded
django_cte-3.0.0.dev20260709201911.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-cte 3.0.0.dev20260709201911
File Interpreter ABI Platform
django_cte-3.0.0.dev20260709201911-py3-none-any.whl Python 3 none any Details

Total release size:25.3 kB

Release files / django_cte-3.0.0.dev20260709201911.tar.gz

Download URL django_cte-3.0.0.dev20260709201911.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
21628d6a4e2f30d0e397c0feac7e81a790ae3da36dabcdb10938ca785b4bc605
BLAKE2b-256 checksum
How to use checksums
f96a941cdf4f8e97a178f542f8fd0369d610d5ab53fd2be1e6e5b01c45736d8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.

Transparency log

Release files / django_cte-3.0.0.dev20260709201911-py3-none-any.whl

Download URL django_cte-3.0.0.dev20260709201911-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78a8c9635d83ee3a2784e9c24ae10c11616c4376662204f72ba7c8af461bf1f1
BLAKE2b-256 checksum
How to use checksums
53709c7592f493a5839cf1f3d4178f3f6fa31251b7c13aa55ce2fc3a5f48a1c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.

Transparency log

Release history Release notifications | RSS feed

4.0.0

2 release files

3.0.0

2 release files

This release

2.0.0

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page