狮身人面像:记录python库的入口点(控制台脚本)

发布于 2025-02-04 20:23:55 字数 391 浏览 2 评论 0原文

我正在开发一个小的Python 3.10库。我已经集成了Sphinx 5.0来记录项目功能,类,模块等。这在Ubuntu容器上运行。文档正在起作用。让我感到困惑的观点是如何正确记录库多个入口点的使用?

更具体地说,在我的setup.cfg中,我写了以下内容:

[options.entry_points]
console_scripts =
    crumbs-fit-sdm = crumbs.sdm.fit:main

以便在安装后,用户可以在终端中输入EG crumbs-fit-sdm input -v要找到.py文件。

如何使Sphinx正确(并自动)记录此功能以及可用选项?

I am developing a small python 3.10 library. I have integrated Sphinx 5.0 to document the project functions, classes, modules etc. This runs on a ubuntu container. The documentation is working. The point that confuses me is how to properly document the use of the library multiple entrypoints?

More specifically, in my setup.cfg, I wrote the following:

[options.entry_points]
console_scripts =
    crumbs-fit-sdm = crumbs.sdm.fit:main

So that after installation the user can type in the terminal eg crumbs-fit-sdm input -v without having to locate the .py file.

How to have Sphinx properly (and automatically) document this feature along with the available options?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文