A package to create documentation for functions in Databricks notebooks
Project description
Notebook-doc
Notebook-doc is a Python package that can create documentation for functions in Databricks notebooks.
It can generate documentation from the docstrings of functions.
It will generate documentation as HTML documents, which can be displayed inside Databricks notebooks.
Usage
The package can be used as follows to generate documentation:
- Install the package (using PyPi - coming soon)
- Import the documentation generator function as follows:
from notebook_doc import render_documentation
- Make sure that you have executed all cells that contain function definitions.
- Execute
render_documentationfunction and provide the globals() dictionary to generate documentation as a HTML script.
Example (in Databricks)
Databricks displayHTML function can be directly used to display the HTML document returned by the render_documentation function.
from notebook_doc import render_documentation
displayHTML(render_documentation(globals(), module_name='Dummy Module'))
Example (in other notebooks)
HTML output from render_documentation function can be written on a local HTML file so that documentation can be displayed as a HTML file.
from notebook_doc import render_documentation
html_output = render_documentation(globals(), module_name='Dummy Module')
with open('dummy_doc.html', 'w') as f:
f.write(html_output)
Project details
Release history Release notifications | RSS feed
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 notebook-doc-0.2.1.tar.gz.
File metadata
- Download URL: notebook-doc-0.2.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4199c2566d693a80fa805401f28ee88206d517e0236fe92a718f94f12f932acd
|
|
| MD5 |
86468d72fa215e740c8cf303cd87bf23
|
|
| BLAKE2b-256 |
199a7d323e57f1352025aa08f955424cf42562d484988a3dfb84f8d325869f0b
|
File details
Details for the file notebook_doc-0.2.1-py3-none-any.whl.
File metadata
- Download URL: notebook_doc-0.2.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d77c8a3c50938dd2c2f3a99c4a6e317cad5c0cac2af9e64cb73739385c17222
|
|
| MD5 |
03d07df9fc16aa63a5584c22155b3bec
|
|
| BLAKE2b-256 |
3a744a93be9b0b0c06cfa07064b0a25e7a3d215abfc126581b0352f59f22ee4c
|