Skip to main content

django bulk_create() function

Project description

Installation

$ pip install django-bulk_create

Features

  • multiple models aggregator

Examples

from django_bulk_create import bulk_create
from apps.app.models import Model1, Model2

create_list = []
create_list+=[Model1(id=42,description='description')]
create_list+=[Model2(key="value")]

model2kwargs = {
    Model1: dict(
        update_conflicts=True,
        unique_fields = ['id'],
        update_fields = [
            'description',
        ]
    ),
    Model2: dict(ignore_conflicts=True)
}
bulk_create(create_list,model2kwargs)

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-bulk_create-1.0.0.tar.gz (1.5 kB view details)

Uploaded Source

File details

Details for the file django-bulk_create-1.0.0.tar.gz.

File metadata

  • Download URL: django-bulk_create-1.0.0.tar.gz
  • Upload date:
  • Size: 1.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for django-bulk_create-1.0.0.tar.gz
Algorithm Hash digest
SHA256 143ffa9f65c295cbb4dc5ad1ecd5f438169426f827d4a5f22d75559d2a2ec1ae
MD5 0a84dd1dfcbd52981d771b2d75714d27
BLAKE2b-256 5e6bc0b513d467093368abe03e5de71dc0ed2df37c1f360715897745880de11c

See more details on using hashes here.

Supported by

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