$npx skillfedfor your agent

cxxheaderparser

Modern C++ header parser

With conditionsPyPI Software DevelopmentReleased Jul 2026365.7K downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — cxxheaderparser-1.9.2-py3-none-any.whl
v1.9.2 · released 2026-07-20 · Python >=3.6 · 1 runtime deps: dataclasses

Yes, if you need to parse C++ headers for binding generation or code analysis. Low install friction, active maintenance, no security issues, and permissive licensing make it a practical choice. Caveat: not suitable if you need full AST semantics, C++ validation, or comprehensive C++17/20 support—use Clang or a compiler for those cases.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a C++ preprocessor if input headers contain macros; use pcpp, GCC, or MSVC preprocessing before parsing, or enable preprocessor support via cxxheaderparser.preprocessor module.
  • Low friction: pure Python wheel with only dataclasses as a runtime dependency (built-in for Python 3.7+).
  • Active maintenance with a release 25 days ago.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause permissive license allows commercial and private use with attribution; no restrictions on derivative works or distribution.

last release 2026-07-20 (25 days) · last repo commit 2026-07-20 · 153 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 365,721 downloads/mo, #7,207 on PyPI

Verify before relying

pip install cxxheaderparser

from cxxheaderparser import parse_file
header_data = parse_file('myheader.h')
print(header_data.classes, header_data.functions)
  • Whether the package handles all C++17/20 constructs or only a subset (description notes not all are supported yet)
  • Performance characteristics when parsing very large or deeply nested header files
  • Accuracy of binding-generator output for complex template specializations
Same gist for agents: .md · .json

What it is and what it does

cxxheaderparser is a pure-Python C++ header parser designed to extract structural information from C++ headers for use in binding generators and code analysis tools. It parses syntactically valid C++ including modern features (C++11 and beyond) and produces either a visitor-style interface for custom processing or a simple data structure containing all parsed elements. The parser does not produce a full AST, does not validate C++ correctness, and requires preprocessed input if macros are present—it trades completeness for practicality, aiming to handle common C++ patterns while acknowledging it may struggle with obscure or overly complex constructs.

The package is a rewrite of CppHeaderParser, designed to provide a cleaner, documented API and better support for modern C++ features. It ships with a command-line interface for dumping parsed headers in multiple formats (pprint, JSON, dataclasses repr) and is actively maintained with support for Python 3.6+.

Use it for

  • Generate language bindings for C++ libraries by extracting function and class signatures from headers
  • Analyze C++ codebases to build documentation or dependency graphs without invoking a compiler
  • Extract type information and method signatures for IDE integration or code generation tools
  • Preprocess and parse C++ headers in build systems where full compilation is not feasible

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to parse C++ headers for binding generation or code analysis.

Low install friction, active maintenance, no security issues, and permissive licensing make it a practical choice. Caveat: not suitable if you need full AST semantics, C++ validation, or comprehensive C++17/20 support—use Clang or a compiler for those cases.

Install

cxxheaderparser on PyPI

Before you install

Low friction: pure Python wheel with only dataclasses as a runtime dependency (built-in for Python 3.7+). Active maintenance with a release 25 days ago.

Requires a C++ preprocessor if input headers contain macros; use pcpp, GCC, or MSVC preprocessing before parsing, or enable preprocessor support via cxxheaderparser.preprocessor module.

License in practice

BSD-3-Clause permissive license allows commercial and private use with attribution; no restrictions on derivative works or distribution.

Quickstart

pip install cxxheaderparser

from cxxheaderparser import parse_file
header_data = parse_file('myheader.h')
print(header_data.classes, header_data.functions)

Verify before relying

  • Whether the package handles all C++17/20 constructs or only a subset (description notes not all are supported yet)
  • Performance characteristics when parsing very large or deeply nested header files
  • Accuracy of binding-generator output for complex template specializations

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.6
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
dataclasses
MaintenanceActively maintained 25 days since the last release
Last repo commit
First released
Downloads365,721 / month, #7,207 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: C++Programming Language :: PythonProgramming Language :: Python :: 3Topic :: Software DevelopmentTopic :: Software Development :: Code GeneratorsTopic :: Software Development :: Compilers

Evidence: cxxheaderparser-1.9.2-py3-none-any.whl

Tags

Capabilities
C++ header parser pythonparse C++ headersC++ binding generatorextract C++ declarationsC++ code analysis pythonC++ header analysisC++ to python bindings
Topics
c++-parsingbinding-generationcode-analysis

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “parse C++ headers”

  • cxxheaderparserParses C++ header files into Python data structures, extracting class…
  • pyrfc6266Parses RFC 6266 Content-Disposition headers to extract filename and…
  • eml-parserParses EML (email) files and extracts structured information…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also pycparser · tree-sitter-cpp · CppHeaderParser · cppclean · pcpp · ctypesgen · pybind11-global · pyclibrary · pybind11 · PyBindGen