Skip to main content

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.0]
        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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

maxdop-0.1.1-py3-none-win_arm64.whl (6.4 MB view details)

Uploaded Python 3Windows ARM64

maxdop-0.1.1-py3-none-win_amd64.whl (6.9 MB view details)

Uploaded Python 3Windows x86-64

maxdop-0.1.1-py3-none-musllinux_1_2_x86_64.whl (7.3 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

maxdop-0.1.1-py3-none-manylinux_2_17_x86_64.whl (7.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

maxdop-0.1.1-py3-none-manylinux_2_17_aarch64.whl (6.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

maxdop-0.1.1-py3-none-macosx_12_0_x86_64.whl (7.8 MB view details)

Uploaded Python 3macOS 12.0+ x86-64

maxdop-0.1.1-py3-none-macosx_12_0_arm64.whl (7.1 MB view details)

Uploaded Python 3macOS 12.0+ ARM64

File details

Details for the file maxdop-0.1.1-py3-none-win_arm64.whl.

File metadata

  • Download URL: maxdop-0.1.1-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

Hashes for maxdop-0.1.1-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 e512b9487a418d6d200c6dfb4e310929491b91af95cd0ed2e953bd3e6c252ae0
MD5 2aad86ae4ad1a80195e98cf2456dc930
BLAKE2b-256 cac0ec92f1f520eca171209f07abcff21338cf036e1ce5ec8b0440f636dc39d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for maxdop-0.1.1-py3-none-win_arm64.whl:

Publisher: release.yml on pagebrooks/maxdop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maxdop-0.1.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: maxdop-0.1.1-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

Hashes for maxdop-0.1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4218eec83027dbbeb77aed3ff9cf9184d92192a6d0a8f20010e25f8c15d8c53d
MD5 e818ac8475b40fb075303db2d48c2c58
BLAKE2b-256 ed7686e3de8de24c2d8b80ae8f3f232dc2b67e1b50c4f826892908cdcd7beb4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for maxdop-0.1.1-py3-none-win_amd64.whl:

Publisher: release.yml on pagebrooks/maxdop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maxdop-0.1.1-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for maxdop-0.1.1-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 652c7c68a5b936b4490ee0db472c0c3d4a883dbe5ea9e160fa9b2092b5e8bcde
MD5 4733178cc884a4a866a28d10d82df277
BLAKE2b-256 c542c62e3aa3ab378a4834e0f547ee496442c53a3725a0e4791128ae5c022467

See more details on using hashes here.

Provenance

The following attestation bundles were made for maxdop-0.1.1-py3-none-musllinux_1_2_x86_64.whl:

Publisher: release.yml on pagebrooks/maxdop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maxdop-0.1.1-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for maxdop-0.1.1-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 763d3a43a0799366fadacd9a6e556ba8bf85e6ad239b1b873ce82e1da3124a8b
MD5 92fc3d673fdf2f1a489206abc8c7a28f
BLAKE2b-256 f6b1114897d094dab0b492d08527d7fe6c80ce4cd6aa8a0a6f08068f7ad76817

See more details on using hashes here.

Provenance

The following attestation bundles were made for maxdop-0.1.1-py3-none-manylinux_2_17_x86_64.whl:

Publisher: release.yml on pagebrooks/maxdop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maxdop-0.1.1-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for maxdop-0.1.1-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 1c63c82fd3645cebc59c8de81322e8cfc215302606105a264a9f5a8f3260abe6
MD5 36c10ac1d30263ce853515f373f74f38
BLAKE2b-256 7e6acaf044162ae516992fdfbaa77641d843cf7837cf734865d3442a36ef334f

See more details on using hashes here.

Provenance

The following attestation bundles were made for maxdop-0.1.1-py3-none-manylinux_2_17_aarch64.whl:

Publisher: release.yml on pagebrooks/maxdop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maxdop-0.1.1-py3-none-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for maxdop-0.1.1-py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 7747a5acaa10d66ea4fc26ea591daa835a8e8805c70e894de9b955c32619abe3
MD5 5beb68c29edcb53cd4f10ee68c1fe3b7
BLAKE2b-256 d33a715011b91fa08bfb9c43b50a542e0f2025291b5d6ee8d09f851563e8c5a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for maxdop-0.1.1-py3-none-macosx_12_0_x86_64.whl:

Publisher: release.yml on pagebrooks/maxdop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maxdop-0.1.1-py3-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for maxdop-0.1.1-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 8a2158a264f45885b8cff23fc31714fc12f03622b4d9ec49245bdcc94fccba86
MD5 1d92c56072965d3b815c98a815553e5b
BLAKE2b-256 9b58d409b2e1ab27afa88ad9037f2ee9abfea2bbd8029dfd7c3109702647474e

See more details on using hashes here.

Provenance

The following attestation bundles were made for maxdop-0.1.1-py3-none-macosx_12_0_arm64.whl:

Publisher: release.yml on pagebrooks/maxdop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.2

7 files

This release

0.1.1 This release

7 files

0.1.0

7 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page