Skip to main content

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:

  1. Install the package (using PyPi - coming soon)
  2. Import the documentation generator function as follows:
    from notebook_doc import render_documentation
    
  3. Make sure that you have executed all cells that contain function definitions.
  4. Execute render_documentation function 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notebook-doc-0.1.5.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

notebook_doc-0.1.5-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file notebook-doc-0.1.5.tar.gz.

File metadata

  • Download URL: notebook-doc-0.1.5.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for notebook-doc-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d7a5ba482bfb43a7cc7adcfd3e5b69b9715f71951cabe856cac8644727166f58
MD5 4879f75b9c68cdfdcacd55b9408b4d63
BLAKE2b-256 a0ec2aa4d7ab3ef4e510f13b60b33577650eacb91c0d8cc5e38231600aa7a555

See more details on using hashes here.

File details

Details for the file notebook_doc-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for notebook_doc-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2803e3c284dd2b2230e0c46f113641d20f2a8294bccb5b4fc129f739fbdaa499
MD5 afda4b8edbf7fc3af03eaeaeeb5c0661
BLAKE2b-256 c03fac5c0b3e65fa4c03f1867329454acfa998867b1a4a142e4ec7473e23b2b2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page