我有一个非常大的项目,包含很多包、模块和依赖项。我想生成项目中几个模块的 API 文档。文档已添加为文档字符串。
我尝试使用 sphinx,但我为导入错误所困扰。避免这些导入错误所需的配置对我来说太多了。
是否有一个文档生成器可以接受一个模块,解析其中的文档字符串并以 markdown、rst 或 html 格式以易于阅读的格式生成输出?
最佳答案
电子文档:
--parse-only, --introspect-only By default, epydoc will gather information about each Python object using two methods: parsing the object's source code; and importing the object and directly introspecting it. Epydoc combines the information obtained from these two methods to provide more complete and accurate documentation. However, if you wish, you can tell epydoc to use only one or the other of these methods. For example, if you are running epydoc on untrusted code, you should use the --parse-only option.
关于python - 任何不尝试运行/导入代码的简单 python 模块文档生成器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20723009/