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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: notebook-doc-0.1.2.tar.gz
  • Upload date:
  • Size: 5.9 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.2.tar.gz
Algorithm Hash digest
SHA256 0336aab0c7f0901d99fe013e63399a6672750870d84b96db0788452781d0cdb0
MD5 071d88499523ec327cb2944c0ac7033f
BLAKE2b-256 dc629228a8b20e6e91ab36094b613ffb8c4df9486c46b9ff92bd8b84896ead5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for notebook_doc-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb6e6a65bbf84e560be1fcedfcd3d60a81eda6ef44e07e399cb6f4bd6ab43427
MD5 0b48dc3ee918afa9a1db0563255b72ea
BLAKE2b-256 6abdecd57acfcd60bc643a9529d0f1c7977bd22a57b3ea7ace7d2e8aef593bb1

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