This release is a pre-release and may not be stable for production use.
liteyuki-autodoc
为你的Python库模块生成清晰的markdown文档
功能:i18n支持,多风格注释支持,多主题支持
安装
pip install litedoc
使用方法
python -m litedoc <your_module_path> -o|--output <output_path>
详细命令参数
-o|--output: "doc-output" 输出路径,默认为doc-output
-l|--lang: "zh-Hans" 语言,支持en, zh-Hans,zh-Hant,ja,默认zh-Hans
-t|--theme: "vitepress" 主题,支持vitepress, vuepress, 默认vitepress
-s|--style: "google" 风格,支持google, numpy, reStructuredText, 默认google,但目前只实现了google,欢迎PR
-c|--contain-top #是否包含顶部文件夹信息,即在输出目录再套一层module_path的basedir
在输出的目录下markdown文档是以模块原有的目录结构生成的,可以直接把输出内容移到目前主流的文档框架中,如VuePress,VitePress等,如果想优化用户体验,还可启用动态侧边栏
代码编写建议
- 在编写库的时候,尽量写上标准的注释,这样对用户和自己都有好处
- 生成器默认不处理"私有"变量和函数,即以
_开头的变量和函数(尽管Python没有真正的私有变量),也默认不处理没有注释的变量 - 如果你不想展示某个函数和变量,可以在函数文档字串任意处加上
@litedoc-hide - 变量注释支持在同一行内使用
#添加的注释,也支持在下一行使用"""注释内容"""添加的注释
示例项目
Metadata
Release files for litedoc 0.1.0.dev20240829075001
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| litedoc-0.1.0.dev20240829075001.tar.gz | 21.7 kB | Without provenance | Details for litedoc-0.1.0.dev20240829075001.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| litedoc-0.1.0.dev20240829075001-py3-none-any.whl | Python 3 | none | any | Details for litedoc-0.1.0.dev20240829075001-py3-none-any.whl |
Total release size: 38.1 kB
Release files / litedoc-0.1.0.dev20240829075001.tar.gz
| Download URL | litedoc-0.1.0.dev20240829075001.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5416dc80b07997194c74b74c11f0a7b224dc3b0498cd972254c2abf8adac118
|
|
BLAKE2b-256 checksum How to use checksums |
51d1e24a160c4083d31c1d4d689cf66a466f971f3f2fe0b521e7f0c9c1d5cc30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.18.1 CPython/3.10.12 Linux/6.5.0-1025-azure
|
Release files / litedoc-0.1.0.dev20240829075001-py3-none-any.whl
| Download URL | litedoc-0.1.0.dev20240829075001-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
555e18e5e3dbbc55f089003cebd2ecb484dbf481f99f3972e1ff638ce6113a03
|
|
BLAKE2b-256 checksum How to use checksums |
d51c6890becea9ec386291732157c61d25b60a2451fac4ddc7426742b2d82020
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.18.1 CPython/3.10.12 Linux/6.5.0-1025-azure
|
Security for litedoc 0.1.0.dev20240829075001
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.