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

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.2-py3-none-win_arm64.whl (6.4 MB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

maxdop-0.1.2-py3-none-macosx_12_0_x86_64.whl (7.9 MB view details)

Uploaded Python 3macOS 12.0+ x86-64

maxdop-0.1.2-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.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

Hashes for maxdop-0.1.2-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 0f9fa87a281022b9e2a2f04c037abbc273514d86de30227248760cc461050820
MD5 5de2128e6304d0af0daa87d54c763778
BLAKE2b-256 2f5f8f564aaa58e215f9b140c91e568a03c2a61a6a2086a64d92e1ec924edffa

See more details on using hashes here.

Provenance

The following attestation bundles were made for maxdop-0.1.2-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.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

Hashes for maxdop-0.1.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5921af43f79f290b480f47a54c084dcdf32615128c18934a4a904d3bb25c5142
MD5 42b47f6884fcdd8b3e8136a6b4e38ca3
BLAKE2b-256 a955782e567ca6e5766b9a2bcd4a475ce86cce1d73208dcbe3df13b7416ce55b

See more details on using hashes here.

Provenance

The following attestation bundles were made for maxdop-0.1.2-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.2-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for maxdop-0.1.2-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5ab0cfc54085d13677a5b322dbd589ee3dea5f89b6dbc23b175602fcb2ace016
MD5 e4290653088039434f570b233e2878af
BLAKE2b-256 080ff82e88f26a1ed8684dbaa703a040145151915037f5a8cd59871192909c64

See more details on using hashes here.

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

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.2-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for maxdop-0.1.2-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a65c1522319387d29ac1e810048ce878678b16ccc9a0688804b0ba3354c27668
MD5 4a51ac6d538bbc85e9ee1d3e28b9a57a
BLAKE2b-256 2c3e1e7f71d1fdb90dd7311cd75138864c1e948fbc00b07095218a6d69f61bcf

See more details on using hashes here.

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

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.2-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for maxdop-0.1.2-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 3a857f9a605a8c66c517b0c12f44841b3ade1543af9ba38a5c9d22e9b8e88461
MD5 0403e82021c8c116ff2c5fcc1bbeb5f1
BLAKE2b-256 c90ad1d866f160c8276155980b2bb5d053ce88ca3dafef94f5ca2be6435639f9

See more details on using hashes here.

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

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.2-py3-none-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for maxdop-0.1.2-py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 ea50494860ef307b2e9307434ce5c014e6039154ae6ee3c9968ebe50348303ff
MD5 afffa011af1666952a734c53d2767e4b
BLAKE2b-256 5c6a15881212b1e25e6951d79651ac981927e1a0ceed28ae0abd0775ee954e0b

See more details on using hashes here.

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

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.2-py3-none-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for maxdop-0.1.2-py3-none-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 14faa35329806a1661b62df272629873418e2bd6e243a116ff41b113b7b3a2dd
MD5 bbe9b0b6f527f51f85c18b8bfa8a9acd
BLAKE2b-256 24f46cb5c20ecdf16a30febd75cd1e8ad5cf48e0fc15763f091933b173ed4704

See more details on using hashes here.

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

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

Release history Release notifications | RSS feed

This release

0.1.2 This release

7 files

0.1.1

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