Skip to main content

High-performance SQLAlchemy bulk upsert operations using temporary table staging - 20x faster than row-by-row approaches.

Project description

Documentation Status https://github.com/MacHu-GWU/sqlalchemy_upsert_kit-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/sqlalchemy_upsert_kit-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/sqlalchemy-upsert-kit.svg https://img.shields.io/pypi/l/sqlalchemy-upsert-kit.svg https://img.shields.io/pypi/pyversions/sqlalchemy-upsert-kit.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to sqlalchemy_upsert_kit Documentation

https://sqlalchemy-upsert-kit.readthedocs.io/en/latest/_static/sqlalchemy_upsert_kit-logo.png

sqlalchemy_upsert_kit provides high-performance bulk upsert operations for SQLAlchemy applications using temporary table staging. It offers three optimized strategies: insert_or_ignore for conflict-free insertion, insert_or_replace for complete record replacement, and insert_or_merge for selective column updates while preserving existing data. Each strategy leverages efficient SQL JOIN operations and temporary tables to achieve ~20x performance improvements over traditional row-by-row upserts, making it ideal for ETL processes, data synchronization, and bulk data operations where speed and reliability are critical.

Install

sqlalchemy_upsert_kit is released on PyPI, so all you need is to:

$ pip install sqlalchemy-upsert-kit

To upgrade to latest version:

$ pip install --upgrade sqlalchemy-upsert-kit

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

sqlalchemy_upsert_kit-0.1.1.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

sqlalchemy_upsert_kit-0.1.1-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file sqlalchemy_upsert_kit-0.1.1.tar.gz.

File metadata

  • Download URL: sqlalchemy_upsert_kit-0.1.1.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for sqlalchemy_upsert_kit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cedc59a0b8058831211c2f3528cb8cf87510009b086c3a2e9d221b152f7514d3
MD5 6d665c80ef29f2421fc48fe61809722e
BLAKE2b-256 b437faf61bb9015838eabeecd69e8558c124265e38000b1608abd1937e94ee4b

See more details on using hashes here.

File details

Details for the file sqlalchemy_upsert_kit-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sqlalchemy_upsert_kit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 91970339ffb455d531fc737867cfa8d3dfe050ac7c325c912fb5812a76cf77fd
MD5 6bc95de38dd0484cf0c3fc12d505654a
BLAKE2b-256 df130fb3ea06e37608a764b4cf73c312ef5f0ea94e7016a5b72c436e14335efb

See more details on using hashes here.

Supported by

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