Skip to main content

A Sphinx extension to automatically document your Contruct structs.

Project description

sphinx-autodoc-construct

A Sphinx extension to automatically document your Contruct structs.

Installation

pip3 install sphinx-autodoc-construct

Configuration

# conf.py
extensions = {
    '...',
    'sphinx_autodoc_construct'
}

Usage

.. automodcon:: my_package.my_module
.. autostruct:: my_package.my_module.my_struct

.. automodcon:: documents all structs found in a module and .. autostruct:: documents a specific struct.

And here's the cool part, once a struct is covered by .. automodcon:: or .. autostruct::, you can link to it in your rst

:any:`link<my_struct>` is displayed as a hyperlink.
:ref:`mystruct<my_struct>` is displayed as a reference.

References can even be used in your commented struct fields

from construct import *

my_struct = Struct(
    'id': Int32ul,
    'otherId': Int32ul * "index refering to :ref:`other_struct`",
)

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-autodoc-construct-0.1.0.tar.gz (8.2 kB view hashes)

Uploaded Source

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