pyDocusaurus: Convert your Python docstrings to Docusaurus Documentation
This package is inspired by Sphinx, which is usually thought of as the "official" solution for auto-generated Python documentation. According to Sphinx's documentation, the automatic generation can be described as:
Generate API documentation for Python, C++ and other software domains, manually or automatically from docstrings, ensuring your code documentation stays up-to-date with minimal effort.
——Sphinx
Overall, this package offers similar functionalities to Sphinx. It goes through the docstrings in the whole package and reorganizes them as an automatically generated API document. However, pyDocusaurus is not an extension of Sphinx, because
- Sphinx is old. It was designed in an era when typing or type hints were not part of the Python standard library (STL). Therefore, Sphinx needs to infer the types from the docstrings. In modern Python code, this feature is redundant.
- Sphinx is essentially proposed for reStructuredText (rst). Certainly, it supports Markdown with specific extensions. However, the Markdown features, especially those related to variable types, are not well integrated with the automatically generated API documents. Users may still suffer a lot of rst code in the generated document.
- Limited by the old-school template, Sphinx does not produce a "modern" website.
Essentially, this package will produce a "patch" for a Docusaurus project. Like Sphinx, pyDocusaurus will go through the whole package and convert the docstring into a Docusaurus-compatible API document, while requiring minimal modifications when integrating the auto-generated document with an existing Docusaurus project (e.g., an existing tutorial site).
1. Install
Intall the latest released version of this package by using the PyPI source:
python -m pip install pydocusaurus
2. Usage
A simple usage is to use the CLI directly:
python -m pydocusaurus render-doc <package-name> -o <out-dir> -u <user-name>
It allows customizations by adding CLI options. To find the details, review the documentation of this project or call
python -m pydocusaurus render-doc --help
pyDocusaurus can also be called by Python codes, for example:
from pydocusaurus import render_package_as_mdx
import any_package
pydocusaurus.render_package_as_mdx(
pydocusaurus, out_dir=out_dir, package_info="username"
)
3. Documentation
Check the documentation to find more details about the examples and APIs.
https://cainmagi.github.io/pydocusaurus/
4. Contributing
5. Changelog
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydocusaurus-1.0.0.tar.gz.
File metadata
- Download URL: pydocusaurus-1.0.0.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
074e3f4a71d2c6b29fc6f5ddfb2d00adaa205771018827c03bd1720df76d8e8e
|
|
| MD5 |
acd43613c99eaadb8730aaf3a8761f2f
|
|
| BLAKE2b-256 |
62ac54f45d636c1d0cb77ff5917bcd6778b97ccdb2b93b4b46e934d7e760f121
|
Provenance
The following attestation bundles were made for pydocusaurus-1.0.0.tar.gz:
Publisher:
python-publish.yml on cainmagi/pydocusaurus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydocusaurus-1.0.0.tar.gz -
Subject digest:
074e3f4a71d2c6b29fc6f5ddfb2d00adaa205771018827c03bd1720df76d8e8e - Sigstore transparency entry: 2755392046
- Sigstore integration time:
-
Permalink:
cainmagi/pydocusaurus@0ef6421a4f35fd7f3a90ac43b7f547db2ee4de0a -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/cainmagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0ef6421a4f35fd7f3a90ac43b7f547db2ee4de0a -
Trigger Event:
release
-
Statement type:
File details
Details for the file pydocusaurus-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pydocusaurus-1.0.0-py3-none-any.whl
- Upload date:
- Size: 97.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43d82b81f3a6fc223322df4b98982dd58bcb77b43b72067ddd6f8acca59c0c36
|
|
| MD5 |
d4110af03749b3a1074f44e4c1401c43
|
|
| BLAKE2b-256 |
e8373ac1630fe86c0650707ede7a2ea95695eebe0b02eb39e1ad27f5028f941e
|
Provenance
The following attestation bundles were made for pydocusaurus-1.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on cainmagi/pydocusaurus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydocusaurus-1.0.0-py3-none-any.whl -
Subject digest:
43d82b81f3a6fc223322df4b98982dd58bcb77b43b72067ddd6f8acca59c0c36 - Sigstore transparency entry: 2755392092
- Sigstore integration time:
-
Permalink:
cainmagi/pydocusaurus@0ef6421a4f35fd7f3a90ac43b7f547db2ee4de0a -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/cainmagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0ef6421a4f35fd7f3a90ac43b7f547db2ee4de0a -
Trigger Event:
release
-
Statement type: