nbproject.header#

nbproject.header(*, parent=None, pypackage=None, filepath=None, env=None, metadata_only=False)#

Display metadata and start tracking dependencies.

If the notebook has no nbproject metadata, initializes & writes metadata to disk.

Parameters:
  • parent – One or more nbproject ids of direct ancestors in a notebook pipeline.

  • pypackage – One or more python packages to track.

  • filepath – Filepath of notebook. Only needed if automatic inference fails.

  • env – Editor environment. Only needed if automatic inference fails. Pass ‘lab’ for jupyter lab and ‘notebook’ for jupyter notebook, this can help to identify the correct mechanism for interactivity when automatic inference fails.

  • metadata_only – Whether or not to return only metadata without writing or displaying anything.

Return type:

Optional[Tuple[Mapping, bool]]