$npx skillfedfor your agent

django-pgviews-redux

Create and manage Postgres SQL Views in Django

With conditionsPyPI DatabaseReleased Mar 2026234.5K downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_pgviews_redux-1.2.0-py3-none-any.whl
v1.2.0 · released 2026-03-11 · Python >=3.10 · 1 runtime deps: django

Yes, if you use PostgreSQL and need to manage views within Django's ORM and migration system. The package is actively maintained, supports current Django and Python versions, and has no known vulnerabilities. The main caveat is the unclear license status—verify the actual license in the repository before adopting. Install friction is low and the feature set is well-documented.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires PostgreSQL as the database backend; views are PostgreSQL-specific and cannot be used with other database engines.
  • Low install friction with a single runtime dependency on django.
  • Active maintenance with recent commits (2026-08-10) and support for modern Python versions (3.10–3.14) and Django versions (5.2, 6.0).

License · maintenance · safety

(unclear) — License status is unclear; the package has no SPDX identifier or raw license declaration in its metadata. Verify the actual license terms in the repository before adopting.

last release 2026-03-11 (156 days) · last repo commit 2026-08-10 · 81 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 234,483 downloads/mo, #9,021 on PyPI

Verify before relying

pip install django-pgviews-redux

# In settings.py, add 'django_pgviews' to INSTALLED_APPS

from django_pgviews import view as pg
from django.db import models

class PreferredCustomer(pg.View):
    name = models.CharField(max_length=100)
    sql = "SELECT id, name FROM myapp_customer WHERE is_preferred IS TRUE"
    class Meta:
        managed = False

# Then run: python manage.py migrate
  • Whether the package is licensed under an open-source license compatible with your project (license metadata is absent).
  • Performance characteristics of materialized view refresh operations under concurrent load.
  • Compatibility with custom Django migration autodetectors beyond the documented subclassing pattern.
Same gist for agents: .md · .json

What it is and what it does

django-pgviews-redux is a Django extension that brings PostgreSQL views into the ORM as first-class model-like objects. Instead of writing raw SQL or using database triggers outside Django, you define views by subclassing `pg.View`, specify the underlying SQL, and manage them through Django migrations just like regular models. The package handles view creation, updates, and deletion automatically during migrations, and provides a `sync_pgviews` management command for manual synchronization.

It supports both regular views and materialized views (which cache results for faster queries). Materialized views can be refreshed manually or via signals, and on PostgreSQL 9.4+ can use concurrent refresh to avoid blocking reads. The package also handles view dependencies, ensuring dependent views are created in the correct order, and provides utilities to drop and recreate views when upstream table columns change—a common migration pain point.

Use it for

  • Create read-only aggregated or filtered views of your data that behave like queryable Django models without duplicating data.
  • Build materialized views to cache expensive query results and refresh them on demand or via signals when source data changes.
  • Manage complex SQL views alongside your Django models in migrations, keeping schema definitions in Python code.
  • Handle PostgreSQL-specific view dependencies and concurrent refresh patterns without writing raw migration operations.
  • Query views using the Django ORM (filtering, ordering, pagination) just like regular models, without raw SQL in application code.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you use PostgreSQL and need to manage views within Django's ORM and migration system.

The package is actively maintained, supports current Django and Python versions, and has no known vulnerabilities. The main caveat is the unclear license status—verify the actual license in the repository before adopting. Install friction is low and the feature set is well-documented.

Install

django-pgviews-redux on PyPI

Before you install

Low install friction with a single runtime dependency on django. Active maintenance with recent commits (2026-08-10) and support for modern Python versions (3.10–3.14) and Django versions (5.2, 6.0).

Requires PostgreSQL as the database backend; views are PostgreSQL-specific and cannot be used with other database engines.

License in practice

License status is unclear; the package has no SPDX identifier or raw license declaration in its metadata. Verify the actual license terms in the repository before adopting.

Quickstart

pip install django-pgviews-redux

# In settings.py, add 'django_pgviews' to INSTALLED_APPS

from django_pgviews import view as pg
from django.db import models

class PreferredCustomer(pg.View):
    name = models.CharField(max_length=100)
    sql = "SELECT id, name FROM myapp_customer WHERE is_preferred IS TRUE"
    class Meta:
        managed = False

# Then run: python manage.py migrate

Verify before relying

  • Whether the package is licensed under an open-source license compatible with your project (license metadata is absent).
  • Performance characteristics of materialized view refresh operations under concurrent load.
  • Compatibility with custom Django migration autodetectors beyond the documented subclassing pattern.

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
django
MaintenanceActively maintained 156 days since the last release
Last repo commit
First released
Downloads234,483 / month, #9,021 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: DjangoFramework :: Django :: 5.2Framework :: Django :: 6.0Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: django_pgviews_redux-1.2.0-py3-none-any.whl

Tags

Capabilities
postgres views django ormsql views django modelsmaterialized views djangopostgresql view managementdjango database viewspostgres view migrationsdjango pgviews
Topics
django-extensionpostgres-viewsorm-integration
PyPI keywords
djangoviewsmaterialized viewspostgres

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “postgres views django orm”

Give your agent the search over MCP, or paste the wish link into any chat.

More Database packages

psycopg2-binary Worth it
PyPI · Software Development · released Apr 2026

psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.

copyleftcompiled wheel · 3.9+
271.6Mdownloads / mo
redis Worth it
PyPI · Database · released Jul 2026

Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.

Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.

MITpure Python · 3.10+
268.3Mdownloads / mo
ydb Worth it
PyPI · Database · released Jul 2026

YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.

Install it if you need to connect Python applications to YDB databases.

permissive licensepure Python · 3.10+
210.0Mdownloads / mo
snowflake-connector-python Worth it
PyPI · Software Development · released Aug 2026

Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.

Apache-2.0compiled wheel · 3.10+
193.6Mdownloads / mo
sqlparse Worth it
PyPI · Software Development · released Aug 2026

sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.

Install it if you need to manipulate, format, or analyze SQL text programmatically.

BSD-3-Clausepure Python · 3.10+
148.9Mdownloads / mo
dbt-adapters With conditions
PyPI · Database · released Jul 2026

Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.

Apache-2.0pure Python · 3.10.0+
121.3Mdownloads / mo

See also dj-materialized-views · sqlalchemy-views · django-postgres-extra · django-multitenant · alembic_utils · schemainspect · django-pg-migration-tools · django-pgtrigger · django-pg-zero-downtime-migrations · django-add-default-value