$npx skillfedfor your agent

django-pg-bulk-update

Django extension, executing bulk update operations for PostgreSQL

With conditionsPyPI DatabaseReleased Jun 2024183.1K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_pg_bulk_update-3.7.3-py2.py3-none-any.whl
v3.7.3 · released 2024-06-30 · 3 runtime deps: django, pytz, typing

Yes, if you are using Django with PostgreSQL and need to perform bulk updates or upserts on many records efficiently. The low install friction and permissive license make it straightforward to adopt. However, note that maintenance is dormant (last release 775 days ago)—verify compatibility with your Django version before committing, and be aware of the documented race condition in bulk_update_or_create on PostgreSQL < 9.5.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires PostgreSQL 9.4+ as the backend database; psycopg2 or psycopg2-binary must be installed separately.
  • Django 1.8+ required.
  • Low install friction with a pure-Python wheel distribution.

License · maintenance · safety

permissive license (permissive) — Licensed under BSD 3-clause, a permissive license with no restrictions on commercial or private use. You may modify and distribute freely provided you include the license notice.

last release 2024-06-30 (775 days) · last repo commit 2024-06-30 · 39 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 183,078 downloads/mo, #10,074 on PyPI

Verify before relying

pip install django-pg-bulk-update

from django_pg_bulk_update import bulk_update

# Update multiple records in one query
bulk_update(MyModel, {1: {'field': 'value'}, 2: {'field': 'value2'}})
  • Whether the dormant maintenance status (775 days since last release) poses a risk for compatibility with recent Django versions.
  • Whether the known race condition issue in bulk_update_or_create on PostgreSQL < 9.5 affects your use case.
  • Performance characteristics compared to native Django bulk operations on modern PostgreSQL versions.
Same gist for agents: .md · .json

What it is and what it does

django-pg-bulk-update is a Django extension that optimizes bulk update and create operations on PostgreSQL by generating raw SQL queries that handle multiple records with different values in a single database round-trip. It provides four main functions: bulk_update (updates multiple records), bulk_update_or_create (upsert pattern), bulk_create (creates multiple records), and pdnf_clause (builds complex OR-AND conditions as Django Q objects).

The package is designed for scenarios where you need to update or insert many rows with different field values based on key conditions—operations that would otherwise require multiple queries or loops. It supports advanced PostgreSQL features like JSONB operations, INSERT ON CONFLICT, and custom set functions (increment, concatenate, array operations). The library requires PostgreSQL 9.4+ and integrates with Django's ORM through custom managers or direct function calls.

Use it for

  • Batch-update user records with different status values based on user IDs in a single query.
  • Perform upsert operations (insert or update) on large datasets using INSERT ON CONFLICT on PostgreSQL 9.5+.
  • Increment numeric fields (e.g., counters) across multiple records without fetching and re-saving each one.
  • Concatenate or merge array/JSONB fields across bulk records with custom set functions.
  • Build complex multi-condition WHERE clauses (OR-AND combinations) using the pdnf_clause helper.

Worth the install?

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

With conditions

Yes, if you are using Django with PostgreSQL and need to perform bulk updates or upserts on many records efficiently.

The low install friction and permissive license make it straightforward to adopt. However, note that maintenance is dormant (last release 775 days ago)—verify compatibility with your Django version before committing, and be aware of the documented race condition in bulk_update_or_create on PostgreSQL < 9.5.

Install

django-pg-bulk-update on PyPI

Before you install

Low install friction with a pure-Python wheel distribution. Maintenance is dormant—last release was 775 days ago—but the repository remains active and unarchived. Relies on django, pytz, and typing as runtime dependencies, all standard.

Requires PostgreSQL 9.4+ as the backend database; psycopg2 or psycopg2-binary must be installed separately. Django 1.8+ required.

License in practice

Licensed under BSD 3-clause, a permissive license with no restrictions on commercial or private use. You may modify and distribute freely provided you include the license notice.

Quickstart

pip install django-pg-bulk-update

from django_pg_bulk_update import bulk_update

# Update multiple records in one query
bulk_update(MyModel, {1: {'field': 'value'}, 2: {'field': 'value2'}})

Verify before relying

  • Whether the dormant maintenance status (775 days since last release) poses a risk for compatibility with recent Django versions.
  • Whether the known race condition issue in bulk_update_or_create on PostgreSQL < 9.5 affects your use case.
  • Performance characteristics compared to native Django bulk operations on modern PostgreSQL versions.

Package facts

Licensepermissive license permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
djangopytztyping
MaintenanceDormant 775 days since the last release
Last repo commit
First released
Downloads183,078 / month, #10,074 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: django_pg_bulk_update-3.7.3-py2.py3-none-any.whl

Tags

Capabilities
django postgresql bulk updatebatch update multiple records djangopostgres bulk operations djangoefficient mass update django ormdjango bulk create insertpostgresql conditional batch updatedjango queryset bulk operations
Topics
django-extensionpostgresql-optimizationbulk-operations

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 › “django postgresql bulk update”

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 django-pg-returning · django-bulk-update · django-postgres-copy · pgcopy · postgrest · salesforce-bulk · django-postgres-extra · djangorestframework-bulk · django-query-builder · django-chunkator