Skip to main content

Documentation builder for Python packages

Project description

The Python package GenPackageDoc generates the documentation of Python modules. The content of this documentation is taken out of the docstrings of functions, classes and their methods.

It is possible to extend the documentation by the content of additional files either in reStructuredText (RST) format or in LaTeX format.

The documentation is generated in four steps:

  1. Files in LaTeX format are taken over immediately.

  2. Files in reStructuredText format are converted to LaTeX files.

  3. All docstrings of all Python modules in the package are converted to LaTeX files.

  4. All LaTeX files together are converted to a single PDF document. This requires a separately installed LaTeX distribution (recommended: TeX Live). A LaTeX distribution is not part of GenPackageDoc and has to be installed separately!

How to install

GenPackageDoc can be installed in two different ways.

  1. Installation via PyPi (recommended for users)

    pip install GenPackageDoc

    GenPackageDoc in PyPi

  2. Installation via GitHub (recommended for developers)

    • Clone the python-genpackagedoc repository to your machine

      git clone https://github.com/test-fullautomation/python-genpackagedoc.git

      GenPackageDoc in GitHub

    • Install dependencies

      Install LaTeX (recommended: TeX Live). This is required.

      Install PlantUML. This is an option.

    • Configure dependencies

      GenPackageDoc uses LaTeX to generate the documentation in PDF format. GenPackageDoc also supports PlantUML. PlantUML requires Java.

      GenPackageDoc needs to know where to find those applications. This is defined in the GenPackageDoc configuration file

      packagedoc\packagedoc_config.json

      Before you start the installation you have to introduce the following environment variables, that are used in packagedoc_config.json:

      • GENDOC_LATEXPATH : path to pdflatex executable

      • GENDOC_PLANTUML_PATH : path to plantuml executable (optional)

      • JAVA_HOME : path to java executable (optional, only in case of PlantUML is used)

    • Use the following command to install GenPackageDoc (executed in repository main folder):

      python -m pip install .

      Or:

      python -m pip install --proxy <proxy> .

      This command will also download and install all dependencies that are required to work with the source files in the current repository. After the initial installation of GenPackageDoc is done, you have the following two possibilities:

      1. Clean the previous installation:

        python "./cleanup_installation.py"

        cleanup_installation.py explicitly deletes all files and folders within the component installation folder under site-packages and also deletes local build artefacts.

      2. Render the component documentation:

        python "./genpackagedoc.py"

        This would e.g. be required in case of changes in the interface of GenPackageDoc.

    • Use the following command to build GenPackageDoc (executed in repository main folder):

      python -m build .

      Or:

      python -m pip config set global.proxy <proxy>
      python -m build .

How to use

GenPackageDoc provides a toolchain to generate documentation out of Python sources that are stored within a repository. GenPackageDoc is also designed to be able to consider setup informations of a repository.

The impact is: There is a deep relationship between the repository containing the sources to be documented, and the sources and the configuration of GenPackageDoc itself. Therefore GenPackageDoc needs to be configured to get to know about things like the path to the package sources and the desired name of the generated documentation PDF file.

GenPackageDoc is able to use it’s own sources to document itself. Therefore the complete GenPackageDoc repository can be used as example about about writing a package documentation.

At the end of all preparations you will get for your own repository a PDF document that will look like this: GenPackageDoc.pdf (that is the detailed documentation of GenPackageDoc).

Feedback

To give us a feedback, you can send an email to Thomas Pollerspöck

In case you want to report a bug or request any interesting feature, please don’t hesitate to raise a ticket.

Maintainers

Holger Queckenstedt

Thomas Pollerspöck

Contributors

Holger Queckenstedt

Thomas Pollerspöck

License

Copyright 2020-2026 Robert Bosch GmbH

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

License: Apache v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

genpackagedoc-0.44.0.tar.gz (906.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genpackagedoc-0.44.0-py3-none-any.whl (918.5 kB view details)

Uploaded Python 3

File details

Details for the file genpackagedoc-0.44.0.tar.gz.

File metadata

  • Download URL: genpackagedoc-0.44.0.tar.gz
  • Upload date:
  • Size: 906.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for genpackagedoc-0.44.0.tar.gz
Algorithm Hash digest
SHA256 36e2cd79521eee9e3a03a08a877e28bedd2ae3afe7ad7f1444cab68cc98aac50
MD5 2aa0ccc5c3c091d192b0d1c3fd6e01ed
BLAKE2b-256 8b39b7fe820bae37b5d8b08a7a669af939d1d752018f74b63f95ff1e2f18d9ab

See more details on using hashes here.

File details

Details for the file genpackagedoc-0.44.0-py3-none-any.whl.

File metadata

  • Download URL: genpackagedoc-0.44.0-py3-none-any.whl
  • Upload date:
  • Size: 918.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for genpackagedoc-0.44.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8ab2324e506d9cc6a12d06192c17f7e896c942eb90a1f49d518b066b06db39b
MD5 d6c4a48765590a25d7e2a263fbc5d153
BLAKE2b-256 b0807bbf3714569fcc5fff0438d1187018b239c3eb915293dc5f7ae938d6aa78

See more details on using hashes here.

Supported by

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