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 details)

Uploaded Source

File details

Details for the file sphinx-autodoc-construct-0.1.0.tar.gz.

File metadata

File hashes

Hashes for sphinx-autodoc-construct-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3ba497ca7c141f13118d0215d0e1057a546ad867e7c0db45fea825e55080d52a
MD5 f8d1e1b017ee75a302ae1728e12309b9
BLAKE2b-256 d35a827c7fc580a4a60e3b6feaa45bed9d4487cd0d3f54af530aadd20e5e1568

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