Skip to main content

Django Bulk Saving

Test package Coverage Status

About

This package provides utility for saving multiple Django model instances using one SQL query.

Install

pip install django-bulk-saving

Usage

Inherit from BulkSavableModel:

from bulk_saving.models import BulkSavableModel
from django.db import models


class Product(BulkSavableModel):
    name = models.CharField(max_length=30)

Use as follows:

with Product.bulk_saving():
    for idx, product in enumerate(Product.objects.all(), 1):
        product.name = 'Product nr %s' % idx
        product.save_later()

Products will be saved after exit from context.

License

The Django Wicked Historian package is licensed under the FreeBSD License.

Metadata

Release files for django-bulk-saving 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-bulk-saving 1.0.0
File Size Uploaded
django-bulk-saving-1.0.0.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-bulk-saving 1.0.0
File Interpreter ABI Platform
django_bulk_saving-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / django-bulk-saving-1.0.0.tar.gz

Download URL django-bulk-saving-1.0.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e0db0bf4ac3468416a8740381f0027536659fd09b6798823418b72dfd5204c39
BLAKE2b-256 checksum
How to use checksums
fee15320c4f1a320d908f97edd42270246e24e5e7284f2dc1790c962034112ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / django_bulk_saving-1.0.0-py3-none-any.whl

Download URL django_bulk_saving-1.0.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1691ba9d7baeef428633b3b67febf1bf82531963cbdeda048424eb5ac707c2d
BLAKE2b-256 checksum
How to use checksums
af893bb64fa230f3cf89af4652bfc436327095dca39b15bfb0b5a5fed06adb15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page