Reference

nb_query.main

Function to search in selected notebooks with keywords, regex or functions.

main.main(query, fnames=None)

Command line wrapper for Typer. Searches all files in the given directories.

Parameters
  • query (str) – Keyword, regex expression or function

  • fnames (Optional[str], optional) – directory to search. Defaults to current directory.

Return type

None

main.nb_query(query, fnames=None)

Function to search in selected notebooks with keywords, regex or functions.

Parameters
  • query (str) – Keyword, regex expression or function

  • fnames (Union[None, str, List[str]]) – str: directory to search (recursively). None: current directory List[str]: list of notebooks to search

Returns

Table of results: notebook location, line matching the query, cell number and cell count

Return type

pd.DataFrame