nbdev-sphinx

raw JSON →
0.0.2398 verified Fri May 01 auth: no python

nbdev-sphinx provides Sphinx extensions for nbdev, enabling automatic documentation of Jupyter notebooks and Python libraries. It offers directives to include notebook outputs, search notebook metadata, and integrate with fastai's nbdev workflow. Current version: 0.0.2398.

pip install nbdev-sphinx
error ModuleNotFoundError: No module named 'nbdev_sphinx'
cause nbdev-sphinx not installed or wrong Python environment.
fix
Run 'pip install nbdev-sphinx' in the correct environment.
error AttributeError: module 'nbdev_sphinx' has no attribute 'NbdevDoc'
cause Incorrect import or old version of nbdev-sphinx.
fix
Use 'from nbdev_sphinx import NbdevDoc' after upgrading to the latest version.
error WARNING: nbdev_index not found
cause nbdev index not built or missing.
fix
Run 'nbdev_build_lib' and 'nbdev_build_docs' in your project root.
deprecated Python 3.6 support is deprecated. Requires Python >=3.6, but current best practice is Python >=3.8.
fix Upgrade Python to 3.8 or higher.
gotcha The library uses nbdev_index to lookup documentation; if the index is not built, imports may silently fail.
fix Run 'nbdev_build_lib' and 'nbdev_build_docs' before building Sphinx docs.
breaking In version 0.0.23xx, the module was renamed from 'nbdev_sphinx' to 'nbdev_sphinx' but the import path changed. Check your conf.py.
fix Use 'from nbdev_sphinx import ...' instead of old import paths.

Basic usage: add 'nbdev_sphinx' to Sphinx extensions in conf.py. The NbdevDoc class can be used programmatically to generate documentation.

from nbdev_sphinx import NbdevDoc
from sphinx.application import Sphinx
# Example usage in conf.py:
# extensions = ['nbdev_sphinx']
# nbdev_doc = NbdevDoc()
# nbdev_sphinx_show_doc = True