Skip to content
Back to skills

Maintain Sqlalchemy Upsert Kit Base

ASecurity

Maintenance knowledge of sqlalchemy_upsert_kit, the bulk upsert library for SQLAlchemy: its one job (three upsert strategies on several database backends), the core versus per-backend architecture and why, how each backend's strategies behave, the local database mise tasks, and how each backend is tested locally and in CI. Load it before changing the package, its tests, its mise tasks, or its CI in this repo.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 12, 2026
databasessqltestingapidatabasebackend

Works with

  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned November 12, 2026

npx -y skills add MacHu-GWU/sqlalchemy_upsert_kit-project --skill maintain-sqlalchemy_upsert_kit-base --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Maintain Sqlalchemy Upsert Kit Base?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Maintain Sqlalchemy Upsert Kit Base
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/machu-gwu-maintain-sqlalchemy-upsert-kit-base/badge)](https://www.skillsdirectory.com/skills/machu-gwu-maintain-sqlalchemy-upsert-kit-base)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: maintain-sqlalchemy_upsert_kit-base
description: "Maintenance knowledge of sqlalchemy_upsert_kit, the bulk upsert library for SQLAlchemy: its one job (three upsert strategies on several database backends), the core versus per-backend architecture and why, how each backend's strategies behave, the local database mise tasks, and how each backend is tested locally and in CI. Load it before changing the package, its tests, its mise tasks, or its CI in this repo."
---

sqlalchemy_upsert_kit does one thing: three bulk upsert strategies (insert or ignore, insert or replace, insert or merge), each staged through a temporary table, on several database backends. Everything that is the same on every database lives in `sqlalchemy_upsert_kit/core/`: input validation, the staging table, and the workflow (`UpsertExecutor`), which runs each call inside one SAVEPOINT. Each backend is its own subpackage, `sqlalchemy_upsert_kit/<engine>/` (today `sqlite/`, `postgres/` and `mysql/`), exposed as `api.<engine>`: its executor overrides only the hooks its database needs (the upsert statement always; how a transaction begins, how the staging table is dropped and cleaned up, how rows are counted, the identifier limit, and a check of other unique keys where the database differs), and its three modules hold the public functions. One shared contract suite, `sqlalchemy_upsert_kit/tests/contract.py`, tests every backend the same way.

For template conventions (layout, code style, tests, docs, release), load `pywf-oss-base`. This family records only what is specific to this library.

## References

Numbered in the order a change usually touches them; each cites only earlier ones.

<!-- BEGIN references index: generated by scripts/update_skill_index.py, do not edit by hand -->

- **Scope and Strategy Contract** (`references/01-scope.md`): Read before adding a feature, changing a strategy's behavior, or deciding whether a request belongs in this library.
- **Architecture: Core and Backends** (`references/02-architecture.md`): Read before moving code between core and a backend, or adding shared logic.
- **Backend: SQLite** (`references/03-backend-sqlite.md`): Read before changing the sqlite backend, or when a SQLite upsert commits, locks, or fires triggers unexpectedly.
- **Backend: PostgreSQL** (`references/04-backend-postgres.md`): Read before changing the postgres backend, or when a PostgreSQL upsert's counts or transaction state look wrong.
- **Backend: MySQL** (`references/05-backend-mysql.md`): Read before changing the mysql backend, or when a MySQL upsert commits, leaves a staging table, or updates the wrong row.
- **Local Database Tasks** (`references/06-local-db-tasks.md`): Read before changing or adding a local database task, or when psql-up or mysql-up fails.
- **Testing the Backends** (`references/07-testing.md`): Read before writing or changing tests, or when a backend's tests fail locally or in CI.

<!-- END references index -->

## Which skill to use

| Job | Skill |
| :--- | :--- |
| Add a new database backend (such as MySQL) | `maintain-sqlalchemy_upsert_kit-add-backend` |
| Any other change: read the references above that it touches | this skill |

Files in this skill

  • SKILL.md3.1 KB
  • references/01-scope.md4.7 KB
  • references/02-architecture.md7 KB
  • references/03-backend-sqlite.md3 KB
  • references/04-backend-postgres.md2.9 KB
  • references/05-backend-mysql.md7.1 KB
  • references/06-local-db-tasks.md5.9 KB
  • references/07-testing.md8.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in databases →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.