skillfed

django-postgres-copy

Quickly import and export delimited data with Django support for PostgreSQL's COPY command

django-postgres-copy v2.8.0 1.1M downloads/30d#4,336 on PyPI188
Permissive license MIT AGING released

What it is and what it does

django-postgres-copy wraps PostgreSQL's native COPY command in a Django-friendly interface, letting you move delimited data directly from files without materializing rows in Python. It's designed for scenarios where you need to transfer large amounts of data into or out of a PostgreSQL table quickly—the COPY command bypasses Django's object instantiation and validation overhead.

The package provides a CopyMapping class that maps CSV columns to Django model fields and handles the mechanics of preparing data and executing the COPY operation. It's a thin, focused tool: no runtime dependencies, straightforward API, and production-stable across recent Django and Python versions. The aging maintenance status (last release 418 days ago) is offset by recent repository activity and broad version support, suggesting the package is stable rather than abandoned.

Use it for:

  • Move large delimited files into PostgreSQL tables as part of a data pipeline.
  • Export Django model querysets to delimited files for reporting.
  • Migrate data between PostgreSQL tables using COPY for speed.
  • Load seed data during deployment when performance matters.
  • Integrate with external data sources that provide delimited formats.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Django ORM integration for PostgreSQL's COPY command to rapidly import and export delimited data without loading everything into memory.

Yes, if you use Django with PostgreSQL and need to move large volumes of delimited data. The package is production-stable, has no dependencies, and low install friction. The aging maintenance timeline is not a blocker—the code is stable and the repository shows recent activity. Install it if bulk operations speed is a requirement; skip it if you only work with small datasets or non-PostgreSQL databases.

Install

django-postgres-copy on PyPI

pip

pip install django-postgres-copy

uv

uv add django-postgres-copy

poetry

poetry add django-postgres-copy

Installing django-postgres-copy

Before you install

Low friction installation with no runtime dependencies. Maintenance status is aging—last release was 418 days ago—but the repository remains active with recent commits and the package is marked production-stable across Django 4.2 through 5.2 and Python 3.9–3.13.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.

Quickstart

pip install django-postgres-copy

from django_postgres_copy import CopyMapping

CopyMapping(
    MyModel,
    csv_file,
    dict_template={"field_name": "csv_column"}
).save()

Requires a Django project with a PostgreSQL database configured; the COPY command is PostgreSQL-specific and will not work with other database backends.

Verify before relying

  • Whether the package works with Django 6.0+ or if support is limited to the versions listed in classifiers.
  • Performance characteristics and memory efficiency gains compared to standard Django bulk operations.
  • Whether custom field types and model inheritance patterns are fully supported by the COPY mapping.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 418 days since the last release
Last repo commit
First released
Downloads 1,121,028/month — #4,336 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_postgres_copy-2.8.0-py3-none-any.whl

Development Status :: 5 - Production/StableFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

django postgres bulk importpostgresql copy command djangofast csv import postgresbulk data loading djangopostgres delimited datadjango orm postgres copyhigh-performance data import
bulk-operationspostgres-nativeetl

More Database packages