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.6.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: notebook-doc-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 4b72d1baf1174b8aaf53f0a6a0c97bb611c1a744e12faa2986b233cb16737fa8
MD5 c9fe1e9b12a507b5d47ac60254dd1c63
BLAKE2b-256 fd21477cca431d8443770ada31786637626e6a7687950c513dfd069746451f18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for notebook_doc-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5c3b03e41482ee06139456384dd9045b5bff82018d2fc558fb0cf37439024808
MD5 6eacc19d2551c8f4501fa26313319fcc
BLAKE2b-256 2e5078e460db06e7a0a4f379ab388ff3c2a87b338d00c98cad3564165315ca24

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