pdoc3 / pdoc

:snake: :arrow_right: :scroll: Auto-generate API documentation for Python projects
https://pdoc3.github.io/pdoc/
GNU Affero General Public License v3.0
1.12k stars 145 forks source link

Article about pdoc3 #360

Closed tirthajyoti closed 2 years ago

tirthajyoti commented 2 years ago

Just FYI, I wrote an article featuring your package on Medium. You can refer to it if you like.

How to Generate Professional API Docs in Minutes from Docstrings

kernc commented 2 years ago

A few comments:

def mult(num1, num2=1):
    """
    Multiplies two numbers

    Args:

    `num1`: The first number

    `num2`: The second number, default `1`

    Returns:

    The result of the **multiplication** process
    """

Rather than styling with Markdown, a better way is to use Numpydoc/Google-style docstring formats when specifying parameters and return values.

"""
...
Handles exception by a check,

    ```python
    if num2 != 0:
        return (num1/num2)
    else:
        raise ValueError('The second argument cannot be zero')
    ```    
"""

In Markdown, you either indent the verbatim code block one level (four spaces) or make it a fenced code block, but not both at the same time (unless you want that ```python header line shown as part of the code).


I'd also mention fairly useful configuration via config.mako and related templates.

Otherwise looks good. Thanks! :heart_decoration: :medal_sports: