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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_cte-4.0.0.dev20260831112716.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_cte-4.0.0.dev20260831112716-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file django_cte-4.0.0.dev20260831112716.tar.gz.

File metadata

File hashes

Hashes for django_cte-4.0.0.dev20260831112716.tar.gz
Algorithm Hash digest
SHA256 9b29182edab60172726a6a1b99c0e428dcc9680406d88617e124eccd0c103da5
MD5 a24f48bb1fb23d0acb194ff98e8ebb79
BLAKE2b-256 72e34f53486074ca8cc5d0d0670fa50dd7fca6811fadcb659544028136d321ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_cte-4.0.0.dev20260831112716.tar.gz:

Publisher: pypi.yml on dimagi/django-cte

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_cte-4.0.0.dev20260831112716-py3-none-any.whl.

File metadata

File hashes

Hashes for django_cte-4.0.0.dev20260831112716-py3-none-any.whl
Algorithm Hash digest
SHA256 f2c500aab67b958a25645266f826c5f404f5d37ea2a1611b127933649241c18f
MD5 1358a3a137a59e0315825a50d4dc8ac3
BLAKE2b-256 b5cbc1d039b62db21f5046ac84dd5c3382d606eb72f534d467f1bd2435d48374

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_cte-4.0.0.dev20260831112716-py3-none-any.whl:

Publisher: pypi.yml on dimagi/django-cte

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

4.0.0

2 files

This release

3.0.0

2 files

2.0.0

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1

2 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