Skip to main content

cpdocs

cpdocs generates semantic, versioned API documentation for C, C++, CUDA, HIP, Fortran, Python and Rust projects.

It asks the project's build system, through a small JSON contract, for the concrete feature sets to document. It builds each feature set independently, consumes the resulting manifest, extracts the API with Clang for C-family languages, source modules for Fortran, ast for Python or rustdoc JSON for Rust, and merges the results. Implementation files from the manifest are kept in the file hierarchy without becoming API entities. Feature-set availability and API language are tracked independently. The versions to publish are an explicit ordered list in cpdocs.yml.

cpdocs build          # document the working tree into build/cpdocs/current
cpdocs versions       # document the configured versions
properdocs build      # project website with the versioned API mounted

Language configurations

The optional languages field in docs/cpdocs.yml is a Keyso configuration space. cpdocs expands it using pykeyso, then runs build.feature-sets once per concrete configuration and build.build once per feature set discovered for that configuration. Both command templates receive dotted placeholders from the resulting nested dictionaries, such as {{cxx.standard}}, {{c.standard}}, {{fortran.standard}}, {{python.version}}, or {{rust.edition}}. The build system decides how to apply each value; cpdocs does not translate them into compiler flags.

languages:
  _product:
    - cxx:
        _nested:
          standard: [17, 20, 23]
    - python:
        _nested:
          version: ["3.11", "3.12"]

build:
  feature-sets: >-
    cmake -S "{{source}}" -B "{{tmpdir}}"
    -DCMAKE_CXX_STANDARD="{{cxx.standard}}"
    -DPROJECT_FEATURE_SETS_OUTPUT="{{output-file}}"
  build: >-
    cmake -S "{{source}}" -B "{{tmpdir}}"
    -DCMAKE_CXX_STANDARD="{{cxx.standard}}"
    -DPROJECT_FEATURE_SET="{{feature-set}}"
    -DPROJECT_CPDOCS_OUTPUT="{{output-file}}"
    && cmake --build "{{tmpdir}}" --target project.cpdocs

Use _set for explicitly paired combinations rather than the _product Cartesian product:

languages:
  _set:
    - cxx: {standard: 17}
      python: {version: "3.11"}
    - cxx: {standard: 23}
      python: {version: "3.12"}

Each concrete configuration has its own work directory. The merged API records both the language configuration and feature set in symbol availability, including overload signatures. If languages is omitted, cpdocs performs the original single build configuration, and the existing {{source}}, {{tmpdir}}, {{output-file}}, {{feature-set}}, and {{python}} placeholders continue to work unchanged.

The configuration lives in docs/cpdocs.yml, the API introduction in docs/api/index.md and the ProperDocs pages in docs/web. The documentation starts at docs/web/index.md; the examples/ directory holds standalone projects that the test suite builds.

Development

uv sync
uv run pytest
uv run ruff check && uv run ruff format --check

The C and C++ tests need clang++, cmake and ninja. Building the Rust example/site also needs the nightly toolchain pinned by examples/rust-basic/rust-toolchain.toml.

Metadata

Release files for cpdocs 0.3.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cpdocs 0.3.9
File Size Uploaded Provenance Actions
cpdocs-0.3.9.tar.gz 172.2 kB Without provenance Details for cpdocs-0.3.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cpdocs 0.3.9
File Interpreter ABI Platform Actions
cpdocs-0.3.9-py3-none-any.whl Python 3 none any Details for cpdocs-0.3.9-py3-none-any.whl

Total release size: 267.1 kB

Release files / cpdocs-0.3.9.tar.gz

Download URL cpdocs-0.3.9.tar.gz
Size 172.2 kB
Tags Source
SHA-256 checksum
How to use checksums
594a3c4417ea63428d44ea2217c709e720cd96f27cef2eca56fbfefbe7cb2f87
BLAKE2b-256 checksum
How to use checksums
aa3f18320e0ef04f6a5c788ce6234f0871b593700a503233f841890f0d464f20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.1 {"ci":null,"cpu":"x86_64","distro":{"libc":{"lib":"glibc","version":"2.44"},"name":"Arch Linux"},"implementation":{"name":"CPython","version":"3.14.8"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.6.5 29 Sep 2026","python":"3.14.8","system":{"name":"Linux","release":"6.18.56-1-lts"}} HTTPX2/2.13.1

Release files / cpdocs-0.3.9-py3-none-any.whl

Download URL cpdocs-0.3.9-py3-none-any.whl
Size 95.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d27fee67c6182082d44efd480e1e06ada69b8e77c4a3a257adc85ef21ecefa6
BLAKE2b-256 checksum
How to use checksums
4e06fb0df9f3f3f628973295aa1d1a994c5a72352b68608766f26414ba2f73f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.1 {"ci":null,"cpu":"x86_64","distro":{"libc":{"lib":"glibc","version":"2.44"},"name":"Arch Linux"},"implementation":{"name":"CPython","version":"3.14.8"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.6.5 29 Sep 2026","python":"3.14.8","system":{"name":"Linux","release":"6.18.56-1-lts"}} HTTPX2/2.13.1

Security for cpdocs 0.3.9

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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