clang-format Python distribution
This project packages the clang-format utility as a Python package. It allows you to install clang-format directly from PyPI:
python -m pip install clang-format
This projects intends to release a new PyPI package for each major and minor release of clang-format.
Use with pipx
You can use pipx to run clang-format, as well. For example, pipx run clang-format <args> will run clang-format without any previous install required on any machine with pipx (including all default GitHub Actions / Azure runners, avoiding requiring a pre-install step or even actions/setup-python).
Use from pre-commit
A pre-commit hook is also provided, use like this:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v23.1.1
hooks:
- id: clang-format
types_or: [c++, c, cuda]
In contrast to many other pre-commit hooks, the versioning of the hook matches the versioning of clang-format.
If you are required to stick with a given major/minor version of clang-format with your pre-commit-hook, you can use this alternative hook repository that also receives backports of older versions of clang-format.
Currently, all major/minor versions of LLVM >= 10 are supported.
It is best to subscribe to releases of the hook repository to get notified of new backport releases, as pre-commit's auto-upgrade functionality will not work in that case.
Building new releases
The clang-format-wheel repository provides the logic to build and publish binary wheels of the clang-format utility.
In order to add a new release, the following steps are necessary:
- Edit the version file
- In the form
llvm_version.wheel_version, e.g.18.0.2.1
- In the form
- Tag the commit with this version to trigger the GitHub Actions release workflow
- e.g.
git tag v18.0.2.1 && git push origin v18.0.2.1
- e.g.
Alternatively, the workflow can be triggered manually:
On manual triggers, the following input variables are available:
llvm_version: Override the LLVM version (default:"")wheel_version: Override the wheel packaging version (default"0")skip_emulation: Set which emulation builds to skip, e.g."qemu"(default:"")deploy_to_testpypi: Whether to deploy to TestPyPI instead of PyPI (default:false)
The repository with the precommit hook is automatically updated using a scheduled Github Actions workflow.
Acknowledgements
This repository extends the great work of several other projects:
clang-formatitself is provided by the LLVM project under the Apache 2.0 License with LLVM exceptions.- The build logic is based on scikit-build-core which greatly reduces the amount of low level code necessary to package
clang-format. - The
scikit-buildpackaging examples of CMake and Ninja were very helpful in packagingclang-format. - The CI build process is controlled by cibuildwheel which makes building wheels across a number of platforms a pleasant experience (!)
Special thanks goes to mgevaert who initiated this project and maintained it until 2021.
We are grateful for the generous provisioning with CI resources that GitHub currently offers to Open Source projects.
Release files for clang-format 23.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| clang_format-23.1.1.tar.gz | 11.5 kB | Details |
Built distributions (wheels)
Total release size:37.1 MB
Release files / clang_format-23.1.1.tar.gz
| Download URL | clang_format-23.1.1.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cd866591d6cce31a6bf4b216a5810be3893cec1ad8213b746f21f5bee6d18bb
|
|
BLAKE2b-256 checksum How to use checksums |
015b50e0d309817837c872544459ae508307669987605fd336f8acc8e1b4ed1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-win_arm64.whl
| Download URL | clang_format-23.1.1-py2.py3-none-win_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 2 Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
7f81856d845b6274b888d0d5f51a1f819f38f080a5b9637a38873f6e0e2cde3b
|
|
BLAKE2b-256 checksum How to use checksums |
904c3ae3671f91d181bfda6148c684c3514c878767c0fbbb3793d4d804103d3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-win_amd64.whl
| Download URL | clang_format-23.1.1-py2.py3-none-win_amd64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 2 Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
eaf3075d7e2bf477c150c6d53bfff040eca851365c0429a06b9bec0de65186d5
|
|
BLAKE2b-256 checksum How to use checksums |
4e98bcf1d46d62b63f92e8ee513dc2c3caa5c3168206af3785ada76ce994c96b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-win32.whl
| Download URL | clang_format-23.1.1-py2.py3-none-win32.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 2 Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
8109e5d13028987912f4477c43afcefa242a016a4212b8ed34dc10395177448b
|
|
BLAKE2b-256 checksum How to use checksums |
fcb47c5f597be1df0db958294e53b375ca606fbbc4a741725e938cf187739d15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-musllinux_1_2_x86_64.whl
| Download URL | clang_format-23.1.1-py2.py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | Linux musl 1.2+ x86-64 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f351726f4706aea605225978484986386167edafa3f85a467bad4a44bfdfa97f
|
|
BLAKE2b-256 checksum How to use checksums |
67d06507318b8c3d3175066d02ba8322de2724b352c8df5153b4e512fba7de28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-musllinux_1_2_s390x.whl
| Download URL | clang_format-23.1.1-py2.py3-none-musllinux_1_2_s390x.whl |
|---|---|
| Size | 3.3 MB |
| Tags | Linux musl 1.2+ IBM System/390x Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6d896cd6c6b32dc31a16c9ba0714e1ea4c0359719552462d12aef80a8e45dcb3
|
|
BLAKE2b-256 checksum How to use checksums |
eb644fb8cfeb3ec6f3ed30a4ac9a36d8c7cc245cf48964a92272227e578331e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-musllinux_1_2_ppc64le.whl
| Download URL | clang_format-23.1.1-py2.py3-none-musllinux_1_2_ppc64le.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Linux musl 1.2+ PowerPC 64-le Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b71734b64d7b7ec7d4e4e167a67b34d0462dd83de5aa74af5de3af3a9d7546de
|
|
BLAKE2b-256 checksum How to use checksums |
bd79f23bb5c9f17e6464e86ca3bc1dbcd11705fd620a69d0379465cb4f4f6b98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-musllinux_1_2_i686.whl
| Download URL | clang_format-23.1.1-py2.py3-none-musllinux_1_2_i686.whl |
|---|---|
| Size | 3.1 MB |
| Tags | Linux musl 1.2+ x86-32 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
68521e74541e34f4a299b82f07735981bb3bce4b0d455ce7a60beb8d9ab4decc
|
|
BLAKE2b-256 checksum How to use checksums |
bfe7055d26ea53be9cb4ebecc98714deda9d16beed991c314e86b46955cac7e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-musllinux_1_2_armv7l.whl
| Download URL | clang_format-23.1.1-py2.py3-none-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 2.6 MB |
| Tags | Linux musl 1.2+ ARMv7l Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a401297fe45f04ae0152f6b5f4c372ad602830be524c2e69469d700abdee1637
|
|
BLAKE2b-256 checksum How to use checksums |
7b0f705db2b7aab2c87e0f06a1fe9fcbb4828df6c9c944bfddc9f9f8422f05d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-musllinux_1_2_aarch64.whl
| Download URL | clang_format-23.1.1-py2.py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | Linux musl 1.2+ ARM64 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
64edd9e43e1c6065239056ea1d8f091aa551379dd96ee311f9b1a973cabfcdde
|
|
BLAKE2b-256 checksum How to use checksums |
a7e7d4127a650065cc67322026be76a7ce2efe4635e61d9151f6cc0a58668871
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-manylinux_2_31_armv7l.whl
| Download URL | clang_format-23.1.1-py2.py3-none-manylinux_2_31_armv7l.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Linux glibc 2.31+ ARMv7l Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8b2e286c8e7070609fbfbd511aed54ba2906a9a348237ba54b3fcab278c6eb78
|
|
BLAKE2b-256 checksum How to use checksums |
6f4f69fb11c496fbdad0924ba82ed45c631a3842bc26a6ad766070d8784e771d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | clang_format-23.1.1-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
64900462c1203cee2fec364536c2dda708baf0619e15b52ceda926648cc82f56
|
|
BLAKE2b-256 checksum How to use checksums |
42ef3f8e215916e79ecd435b5bc20810443f80fce3fb8bbfe6d2783ceb775c1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl
| Download URL | clang_format-23.1.1-py2.py3-none-manylinux_2_26_s390x.manylinux_2_28_s390x.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Linux glibc 2.26+ IBM System/390x Linux glibc 2.28+ IBM System/390x Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f965f1e50de06cb86af8ac23d55748b87876c12e7a156a53ec4417d91a6fe656
|
|
BLAKE2b-256 checksum How to use checksums |
70e67b1a41605228a6b58e670fc1ede2728a93a230906833bd1242eb0b2f0b8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl
| Download URL | clang_format-23.1.1-py2.py3-none-manylinux_2_26_ppc64le.manylinux_2_28_ppc64le.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Linux glibc 2.26+ PowerPC 64-le Linux glibc 2.28+ PowerPC 64-le Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
29a70106390a32ec552591e73fec4d9b3c892668fe28fe5c2c47bf68d550fe55
|
|
BLAKE2b-256 checksum How to use checksums |
f14b70cc4a70e48ed4f992851e96da53a94dfed806179e2e6100f3a133268f4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl
| Download URL | clang_format-23.1.1-py2.py3-none-manylinux_2_26_i686.manylinux_2_28_i686.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Linux glibc 2.26+ x86-32 Linux glibc 2.28+ x86-32 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
965c8bd87cabb26942a336bceb99186a2de6874a7d3f734e540090e634195726
|
|
BLAKE2b-256 checksum How to use checksums |
186fc4b0520fb413632828a86a1ba1ed4629e7f80ac59b403b77a7baa7c2fd79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | clang_format-23.1.1-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
09af54d2ef51680b34e36ed71b9f510bd399fb7b10b29a2a40843cd0e0344228
|
|
BLAKE2b-256 checksum How to use checksums |
0eb61a162e427d912b88653a66e99a22414d798eb885b761ffddb74dbc13963f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-macosx_11_0_arm64.whl
| Download URL | clang_format-23.1.1-py2.py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Python 2 Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d64a1788759c4cbc08a0aca21dd2bd38605c0758543aa15b8c0636508f0ebae7
|
|
BLAKE2b-256 checksum How to use checksums |
29daf354b637650ae04854d9096c252d08f03ccda7044b1f005861a4ddba28cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency logRelease files / clang_format-23.1.1-py2.py3-none-macosx_10_9_x86_64.whl
| Download URL | clang_format-23.1.1-py2.py3-none-macosx_10_9_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Python 2 Python 3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
8f8ea1e02f7cab8dace82a0d56733e532ffc3e6e41e658edc28261029e94c499
|
|
BLAKE2b-256 checksum How to use checksums |
45a3e45ab75ae0fbe8f90a637af146978d1ef3799c26252163a8068b19a46e03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.
Transparency log