Skip to main content

Common Table Expressions (CTE) for Django

Project description

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.

Project details


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-3.0.0.tar.gz (11.4 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-3.0.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file django_cte-3.0.0.tar.gz.

File metadata

  • Download URL: django_cte-3.0.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_cte-3.0.0.tar.gz
Algorithm Hash digest
SHA256 888710bb7109559621a34ab890f0f87d54188c9678f874e61e82112b59bbccb4
MD5 5a3b340b65bf4d1824b1c53830c8772c
BLAKE2b-256 dbc064cda7c7b3e5641160a4c9dd1030b3a567592ba2b6c64f5303678a780084

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_cte-3.0.0.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-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: django_cte-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_cte-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3eabb89b68d328a6a97c695a21f45ed6ee7a6602193670db74e70c2e17bf2cd5
MD5 6cadb6cb9ea4c6d0125275648f2ef4ca
BLAKE2b-256 ee8a5fdf282b8496e485b007d48ac211a0e2b203b8623e67c32ed2cf65faedc4

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_cte-3.0.0-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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page