get_notebook_file_from_within_notebook#

API documentation for tradeexecutor.utils.jupyter_notebook_name.get_notebook_file_from_within_notebook Python function.

get_notebook_file_from_within_notebook(_globals)[source]#

Return the notebook file.

  • Must be called from within the notebook

  • Compatibility limits
    • Visual Studio Code

    • ipython

    • Jupyter-based systems through ipynbname

Example:

# Get notebook filename stem
RUN_ID = get_notebook_file_from_within_notebook(globals())
Returns:

Full path to the currently executed notebook

Return type:

Path