Ask Your Question

Revision history [back]

There are several ways to create documentation without using docstrings:

  1. External documentation: Write separate documentation files in any format of your choice (.txt, .md, .html, .pdf, etc.) and explain the functionality and usage of your code in those files.

  2. Comments: Use inline or block comments in your code to explain what each portion does, how the logic flows, and any other relevant information.

  3. Project Wiki: Use a Wiki tool to create project-specific documentation that covers how to install, run, and maintain the system.

  4. README files: README files are typically the first point of contact with contributors or other users of your code. This file should be a brief, but complete, description of your code's purpose, dependencies, and installation.

  5. Sphinx: Sphinx is a popular documentation generator that can be used to produce high-quality documentation for Python code. It supports several input formats, including reStructuredText and Markdown, and also generates HTML, PDF, and EPUB output.

  6. Code Annotations: Use code annotations to add descriptions and explanations to your code that are output as part of the documentation.

  7. API documentation generators: There are several API documentation generators available, such as Swagger, that can be used to generate documentation for your code's API endpoints.