High-performance SQLAlchemy bulk upsert operations using temporary table staging - 20x faster than row-by-row approaches.
Project description
Welcome to sqlalchemy_upsert_kit Documentation
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 |
cedc59a0b8058831211c2f3528cb8cf87510009b086c3a2e9d221b152f7514d3
|
|
MD5 |
6d665c80ef29f2421fc48fe61809722e
|
|
BLAKE2b-256 |
b437faf61bb9015838eabeecd69e8558c124265e38000b1608abd1937e94ee4b
|
File details
Details for the file sqlalchemy_upsert_kit-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: sqlalchemy_upsert_kit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
91970339ffb455d531fc737867cfa8d3dfe050ac7c325c912fb5812a76cf77fd
|
|
MD5 |
6bc95de38dd0484cf0c3fc12d505654a
|
|
BLAKE2b-256 |
df130fb3ea06e37608a764b4cf73c312ef5f0ea94e7016a5b72c436e14335efb
|