maxdop
Max Degree of Prettiness for your T-SQL. A T-SQL formatter that runs in CI, understands the whole language, and checks its own work.
maxdop query.sql # formatted SQL to stdout
maxdop --write src/ # format every .sql under src/, in place
maxdop --check src/ # fail the build if anything would change
This package ships the native maxdop executable for your platform. It has no
Python dependencies and is not importable — installing it puts the maxdop
command on your PATH, nothing more. There is no interpreter between you and the
binary, so cold start stays around 3.5 ms.
Why
Most SQL formatters tokenise and guess, and lose the shape of your code when it
matters. maxdop is built on ScriptDom,
Microsoft's own T-SQL parser — twelve grammars, SQL Server 2000 to 2025 plus
Fabric DW. It reads stored procedures, GO batches and 2000-era syntax the way
the server does.
It also verifies itself. Every result is re-parsed and compared against your input — token stream, tree and comments. If anything differs you get your original file back, untouched, and a distinct exit code. Measured over 2,215 real-world files: zero refusals, zero comments lost.
Use it with pre-commit
repos:
- repo: local
hooks:
- id: maxdop
name: maxdop
entry: maxdop --write
language: python
additional_dependencies: [maxdop==0.1.2]
types: [sql]
pre-commit builds a virtualenv, pip resolves the wheel for that machine, and the binary lands on PATH — nothing to install first.
Configuration
One .maxdop.json at your repo root, committed next to the code it formats, so
a repo formats the same way whoever opens it.
{
"maxWidth": 100,
"indentSize": 4,
"keywordCase": "upper",
"parserVersion": "2022"
}
Full documentation, other install methods, and the comparison against the other ten T-SQL formatters: https://github.com/pagebrooks/maxdop
MIT licensed.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maxdop-0.1.2-py3-none-win_arm64.whl.
File metadata
- Download URL: maxdop-0.1.2-py3-none-win_arm64.whl
- Upload date:
- Size: 6.4 MB
- Tags: Python 3, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f9fa87a281022b9e2a2f04c037abbc273514d86de30227248760cc461050820
|
|
| MD5 |
5de2128e6304d0af0daa87d54c763778
|
|
| BLAKE2b-256 |
2f5f8f564aaa58e215f9b140c91e568a03c2a61a6a2086a64d92e1ec924edffa
|
Provenance
The following attestation bundles were made for maxdop-0.1.2-py3-none-win_arm64.whl:
Publisher:
release.yml on pagebrooks/maxdop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxdop-0.1.2-py3-none-win_arm64.whl -
Subject digest:
0f9fa87a281022b9e2a2f04c037abbc273514d86de30227248760cc461050820 - Sigstore transparency entry: 2668640607
- Sigstore integration time:
-
Permalink:
pagebrooks/maxdop@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/pagebrooks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file maxdop-0.1.2-py3-none-win_amd64.whl.
File metadata
- Download URL: maxdop-0.1.2-py3-none-win_amd64.whl
- Upload date:
- Size: 6.9 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5921af43f79f290b480f47a54c084dcdf32615128c18934a4a904d3bb25c5142
|
|
| MD5 |
42b47f6884fcdd8b3e8136a6b4e38ca3
|
|
| BLAKE2b-256 |
a955782e567ca6e5766b9a2bcd4a475ce86cce1d73208dcbe3df13b7416ce55b
|
Provenance
The following attestation bundles were made for maxdop-0.1.2-py3-none-win_amd64.whl:
Publisher:
release.yml on pagebrooks/maxdop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxdop-0.1.2-py3-none-win_amd64.whl -
Subject digest:
5921af43f79f290b480f47a54c084dcdf32615128c18934a4a904d3bb25c5142 - Sigstore transparency entry: 2668640429
- Sigstore integration time:
-
Permalink:
pagebrooks/maxdop@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/pagebrooks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file maxdop-0.1.2-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: maxdop-0.1.2-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 7.3 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ab0cfc54085d13677a5b322dbd589ee3dea5f89b6dbc23b175602fcb2ace016
|
|
| MD5 |
e4290653088039434f570b233e2878af
|
|
| BLAKE2b-256 |
080ff82e88f26a1ed8684dbaa703a040145151915037f5a8cd59871192909c64
|
Provenance
The following attestation bundles were made for maxdop-0.1.2-py3-none-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on pagebrooks/maxdop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxdop-0.1.2-py3-none-musllinux_1_2_x86_64.whl -
Subject digest:
5ab0cfc54085d13677a5b322dbd589ee3dea5f89b6dbc23b175602fcb2ace016 - Sigstore transparency entry: 2668640540
- Sigstore integration time:
-
Permalink:
pagebrooks/maxdop@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/pagebrooks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file maxdop-0.1.2-py3-none-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: maxdop-0.1.2-py3-none-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 7.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a65c1522319387d29ac1e810048ce878678b16ccc9a0688804b0ba3354c27668
|
|
| MD5 |
4a51ac6d538bbc85e9ee1d3e28b9a57a
|
|
| BLAKE2b-256 |
2c3e1e7f71d1fdb90dd7311cd75138864c1e948fbc00b07095218a6d69f61bcf
|
Provenance
The following attestation bundles were made for maxdop-0.1.2-py3-none-manylinux_2_17_x86_64.whl:
Publisher:
release.yml on pagebrooks/maxdop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxdop-0.1.2-py3-none-manylinux_2_17_x86_64.whl -
Subject digest:
a65c1522319387d29ac1e810048ce878678b16ccc9a0688804b0ba3354c27668 - Sigstore transparency entry: 2668640504
- Sigstore integration time:
-
Permalink:
pagebrooks/maxdop@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/pagebrooks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file maxdop-0.1.2-py3-none-manylinux_2_17_aarch64.whl.
File metadata
- Download URL: maxdop-0.1.2-py3-none-manylinux_2_17_aarch64.whl
- Upload date:
- Size: 6.7 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a857f9a605a8c66c517b0c12f44841b3ade1543af9ba38a5c9d22e9b8e88461
|
|
| MD5 |
0403e82021c8c116ff2c5fcc1bbeb5f1
|
|
| BLAKE2b-256 |
c90ad1d866f160c8276155980b2bb5d053ce88ca3dafef94f5ca2be6435639f9
|
Provenance
The following attestation bundles were made for maxdop-0.1.2-py3-none-manylinux_2_17_aarch64.whl:
Publisher:
release.yml on pagebrooks/maxdop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxdop-0.1.2-py3-none-manylinux_2_17_aarch64.whl -
Subject digest:
3a857f9a605a8c66c517b0c12f44841b3ade1543af9ba38a5c9d22e9b8e88461 - Sigstore transparency entry: 2668640327
- Sigstore integration time:
-
Permalink:
pagebrooks/maxdop@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/pagebrooks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file maxdop-0.1.2-py3-none-macosx_12_0_x86_64.whl.
File metadata
- Download URL: maxdop-0.1.2-py3-none-macosx_12_0_x86_64.whl
- Upload date:
- Size: 7.9 MB
- Tags: Python 3, macOS 12.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea50494860ef307b2e9307434ce5c014e6039154ae6ee3c9968ebe50348303ff
|
|
| MD5 |
afffa011af1666952a734c53d2767e4b
|
|
| BLAKE2b-256 |
5c6a15881212b1e25e6951d79651ac981927e1a0ceed28ae0abd0775ee954e0b
|
Provenance
The following attestation bundles were made for maxdop-0.1.2-py3-none-macosx_12_0_x86_64.whl:
Publisher:
release.yml on pagebrooks/maxdop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxdop-0.1.2-py3-none-macosx_12_0_x86_64.whl -
Subject digest:
ea50494860ef307b2e9307434ce5c014e6039154ae6ee3c9968ebe50348303ff - Sigstore transparency entry: 2668640664
- Sigstore integration time:
-
Permalink:
pagebrooks/maxdop@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/pagebrooks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file maxdop-0.1.2-py3-none-macosx_12_0_arm64.whl.
File metadata
- Download URL: maxdop-0.1.2-py3-none-macosx_12_0_arm64.whl
- Upload date:
- Size: 7.1 MB
- Tags: Python 3, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14faa35329806a1661b62df272629873418e2bd6e243a116ff41b113b7b3a2dd
|
|
| MD5 |
bbe9b0b6f527f51f85c18b8bfa8a9acd
|
|
| BLAKE2b-256 |
24f46cb5c20ecdf16a30febd75cd1e8ad5cf48e0fc15763f091933b173ed4704
|
Provenance
The following attestation bundles were made for maxdop-0.1.2-py3-none-macosx_12_0_arm64.whl:
Publisher:
release.yml on pagebrooks/maxdop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxdop-0.1.2-py3-none-macosx_12_0_arm64.whl -
Subject digest:
14faa35329806a1661b62df272629873418e2bd6e243a116ff41b113b7b3a2dd - Sigstore transparency entry: 2668640570
- Sigstore integration time:
-
Permalink:
pagebrooks/maxdop@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/pagebrooks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1f08fe154f0a50ed2d6dcd6b418721772a0bf91 -
Trigger Event:
push
-
Statement type: