Skip to main content

A sphinx autodoc extension for c modules

Project description

Build Status Coverage Code Style Documentation Status

Dual-licensed under MIT or the UNLICENSE.

A basic attempt at extending Sphinx and autodoc to work with C files.

The idea is to add support for similar directives that autodoc provides. i.e.

A function in my_c_file.c:

/**
 * A simple function that adds.
 *
 * @param a: The initial value
 * @param b: The value to add to `a`
 *
 * @returns The sum of `a` and `b`.
 *
 */
int my_adding_function(int a, int b) {
    return a + b;
    }

Could be referenced in documentation as:

.. autocfunction:: my_c_file.c::my_adding_function

With the resulting documentation output of:

int my_adding_function(int a, int b)

A simple function that adds.

Parameters:
  • a - The initial value

  • b - The value to add to a

Returns:

The sum of a and b

Requires

Similar Tools

  • hawkmoth a sphinx extension that which will document all of a C file. It supports being able to regex list files and have those files be documented.

  • breathe A doxygen output to sphinx tool.

Full Documentation

The complete documentation can be found at https://sphinx-c-autodoc.readthedocs.io/en/latest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_c_autodoc-1.4.0.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

sphinx_c_autodoc-1.4.0-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_c_autodoc-1.4.0.tar.gz.

File metadata

  • Download URL: sphinx_c_autodoc-1.4.0.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for sphinx_c_autodoc-1.4.0.tar.gz
Algorithm Hash digest
SHA256 e14047b87848f7877616a008ad0b26e920a8fd77945d6ff1f808499041dffa83
MD5 e2d9644d6992c032cd62fdbbc2f03b52
BLAKE2b-256 41f3727fa7949b9f226a1f0b18c17d76bd24f1cae89218c4ec2789ca9766e20a

See more details on using hashes here.

File details

Details for the file sphinx_c_autodoc-1.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_c_autodoc-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8f8124054971808d96e95e3bb0916f8bd12fb41036c5a5977a522064400aa76
MD5 cb111aa3198313d244fb4e22ae812429
BLAKE2b-256 f7a0ff3beb6a7e42b50e4aa61ea436bd853f56c674e5ab39431fb268bffb99ee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page