A Git clean/smudge filter for SQLite databases that ensures logical, deterministic SQL dumps.
Features
Noise Reduction: Stable row sorting by Primary Key prevents “phantom diffs”.
FTS5 Support: Correctly filters virtual table shadow tables for transparent restoration.
Generated Columns: Excludes virtual/stored columns from INSERT statements.
Lock Resilience: Uses atomic backups to handle busy databases during commits.
Installation
Install directly via pip:
pip install git-sqlite-filter
Usage
Configure the filter in your .gitattributes:
*.sqlite filter=sqlite diff=sqlite
*.db filter=sqlite diff=sqlite
And in your .gitconfig (global or local):
[filter "sqlite"]
clean = git-sqlite-clean %f
smudge = git-sqlite-smudge %f
required = true
[diff "sqlite"]
# Allows 'git diff' to show readable SQL changes
textconv = git-sqlite-clean
Debugging
Enable debug logging with the --debug flag or by setting GIT_TRACE=1:
GIT_TRACE=1 git diff mydb.sqlite
Development
Run the test suite with coverage:
make dev-deps
make test
Run linting:
make lint
Metadata
Release files for git-sqlite-filter 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| git_sqlite_filter-0.1.2.tar.gz | 12.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| git_sqlite_filter-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.2 kB
Release files / git_sqlite_filter-0.1.2.tar.gz
| Download URL | git_sqlite_filter-0.1.2.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0658b765e78babee6c5d0577a9500b5521f281df7fce8b268b1f6a8967988ab
|
|
BLAKE2b-256 checksum How to use checksums |
879e2f0f0c215cc118e7fa73b955a0e3fd8dac5dca24222d48bc60effc0d4f07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / git_sqlite_filter-0.1.2-py3-none-any.whl
| Download URL | git_sqlite_filter-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38a473de056687e64f06bd0556a6e5f532fe87ff05b55dedac9c36ac8046f380
|
|
BLAKE2b-256 checksum How to use checksums |
994f4add09aecdbb691a5bb4958195b41071187a4c9708bb55bd4e86fe9af8ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Security for git-sqlite-filter 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.