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

Uploaded Source

Built Distribution

notebook_doc-0.1.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: notebook-doc-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 0346beb34569b13a6b903abdf7d6330998f210d10adaa3dba2f061214c405973
MD5 8a395456c4c227ff2a932aad7df1fbbd
BLAKE2b-256 53c117c4ce07c59a6bab56973a0c605abca19d035d5723dba64032855ff5edd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for notebook_doc-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a260a26238195bfa44efd4c7d2c83684e675a13984ce1acc27cd435ab8c221c0
MD5 3f82007522893206d112f73d30b4a6d0
BLAKE2b-256 6c6bf6325953cac0e61f7ff1eee82b50eb57fc69b9ced18cc80745bf99ca3a8a

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