Write Hooks

alembic.script.write_hooks. register (name: str) → Callable

A function decorator that will register that function as a write hook.

See the documentation linked below for an example.

See also Writing Custom Hooks as Python Functions