python - 任何不尝试运行/导入代码的简单 python 模块文档生成器?

标签 python

我有一个非常大的项目,包含很多包、模块和依赖项。我想生成项目中几个模块的 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/

相关文章:

python s3 使用 boto,说 'attribute error: ' str' 对象没有属性 'connection'

python - 快速查找数组中所有元素的总和小于限制的索引

python - 尝试从 docker 容器访问时,Datastore 返回 503

python - multiprocessing pool.map 未按顺序处理列表

python - R 相当于 Python 的 dask

python - 如何在 Python 模拟中调用模拟方法

python - 如何更改Python中有序字典中的特定值

python - 获取 Python Requests 中状态码的描述

python - 如何使用机器人更改用户的 Twitter 名称?

python - 如何使用 SWIG 将 numpy 数组转换为 vector<int>& (引用)