Registry / devops / pyclang

pyclang

JSON →
library0.6.3pypypi✓ verified 82d ago

A Python clang-tidy runner that provides a convenient way to run clang-tidy on C/C++ source files. Version 0.6.3 is released on PyPI with a release cadence of approximately once per year.

pip install pyclang
INSTALL
IMPORT
SIG · PYCLANG
P
pyclang
devopspythonv0.6.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Runner
from pyclang import Runner
from pyclang import ClangTidyRunner
runner
from pyclang import runner
utils
from pyclang import utils

Basic usage: create a runner, call run() with a source file path.

from pyclang import ClangTidyRunner import os # clang-tidy must be installed and on PATH runner = ClangTidyRunner() output = runner.run('example.cpp', checks='*', config='') print(output)
Debug
Known issues
gotchaclang-tidy must be installed and available in PATH before using pyclang. The package does not install clang-tidy.
fix
Install clang-tidy via your system package manager (e.g., apt install clang-tidy) or from llvm.org.
affects: all
breakingVersion 0.6.x changed the return type of run() from string to a custom result object. Code expecting a string will break.
fix
Access output via result.output or result.errors instead of treating the return value as a string.
affects: >=0.6.0
gotchaThe constructor ClangTidyRunner() accepts optional parameters like clang_tidy_path, but does not validate the path until run() is called. Misconfiguration leads to runtime errors.
fix
Ensure clang_tidy_path points to a valid clang-tidy executable, or leave as default (assumes on PATH).
affects: all
Upgrade
Version history
0.6.3latest on PyPI · released May 5, 2025
Audit
Dependencies
clang-tidyrequiredRequired external tool; must be installed separately (e.g., via llvm/clang) and available on PATH
Agent activity
6 hits · last 30 days
node
6
Resources

No resource links recorded.

pyclang — pip install pyclang · libregistry