tesserakit-sql
Lint SQL files and migrations into a statement and table catalog.
tessera-sql parses .sql files with lightweight heuristics (no database connection, no execution), builds a catalog of statements and declared tables, and flags high-signal migration-safety issues.
Lint SQL
tessera sql lint --input migrations/ --output ./out/sql_pack
tessera sql lint --input schema.sql --output ./out/sql_pack
Artifacts written:
statements.jsonl one SqlStatement per parsed statement (kind, target, flags)
tables.jsonl one SqlTable per CREATE TABLE (columns, primary-key flag)
index.md statement catalog
validation_report.md safety findings
coverage_report.md statement-kind distribution
tables.md table catalog with columns and PK status
Lint rules
Query safety:
delete_without_where(error) —DELETEwith noWHEREremoves every rowupdate_without_where(warning) —UPDATEwith noWHEREwrites every rowselect_star(info) —SELECT *couples the query to column shape
Migration safety (the costly, easy-to-miss class):
add_not_null_without_default(error) —ALTER TABLE ... ADD COLUMN ... NOT NULLwith noDEFAULTrewrites the table and fails on existing rowstruncate_table(warning) —TRUNCATEwipes all rows and is often non-transactional / irreversibledrop_column(warning) — dropping a column is destructive and irreversiblerename_breaks_compatibility(warning) —RENAMEbreaks code referencing the old name; prefer add-new + backfill + drop-olddrop_without_if_exists(warning) —DROPwithoutIF EXISTSfails if the object is absentcreate_table_without_if_not_exists(info) — non-idempotent if the migration re-runs
Schema:
table_without_primary_key(warning) — aCREATE TABLEdeclares noPRIMARY KEYno_statements— nothing parsed
Limitations (v0.1)
Parsing is heuristic: comments are stripped, statements are split on top-level semicolons (quote-aware), and classification is keyword/regex based. It is tuned for migration and schema files, not for validating arbitrary vendor SQL dialects.
Metadata
Release files for tesserakit-sql 0.4.0
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 | Actions |
|---|---|---|---|---|
| tesserakit_sql-0.4.0.tar.gz | 8.6 kB | Without provenance | Details for tesserakit_sql-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tesserakit_sql-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for tesserakit_sql-0.4.0-py3-none-any.whl |
Total release size: 18.9 kB
Release files / tesserakit_sql-0.4.0.tar.gz
| Download URL | tesserakit_sql-0.4.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5272d4513c911ac956a3cd3e5553bd0cfb5ece8d7b6514fcb2d0b78acb4b276c
|
|
BLAKE2b-256 checksum How to use checksums |
da07f1020f9dbb230079260e09ecb2f6f615989568bcadbe9056da967ac26522
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / tesserakit_sql-0.4.0-py3-none-any.whl
| Download URL | tesserakit_sql-0.4.0-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f21cb70c7d261a31f98b678b60ea350d3e36ed80002b2daa16b68d8b72a50f4
|
|
BLAKE2b-256 checksum How to use checksums |
a45b12ce777a0dece28b6ab3a3230ae77b37f8c1bddc465d689cd51422d99b58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for tesserakit-sql 0.4.0
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.