This page provide a full example of how to use Docution, to auto-document a python project in a Notion page.
The first step is to have a python project that you want to document.
For this tutorial, we will use a dummy project. You can find the source code in the docution repository at : https://github.com/astariul/docution/blob/master/example/__init__.py
Clone it locally :
git clone <https://github.com/astariul/docution>
cd docution
Then you will need to have the docution
package installed. Refer to the Installation page for this step.
Go to Notion and create a page. Write your documentation in there, and wherever you want to include your API reference, write a text block with the following content :
/docution *module.function_name*
For example, in our dummy project, we have a function called function_with_types_in_docstring()
in the example
module, so if we want to document it, we write :
/docution example.function_with_types_in_docstring
So in this case, my page look like (the important block is the third one !) :
Follow the official Notion guide to create an integration, or follow these steps :