Search code examples
pythonjupyter-notebooktrustedpapermill

How to mark Jupyter Notebook trusted when generating the notebook with Papermill


I have a daily process using Papermill to generate a few Jupyter Notebook files that overwrite the files from previous day. Every time the newly generated files are marked as "untrusted". I can click the button to make them trusted, but annoying to do that everyday. Is there any way to automatically set those files to be "trusted" when generating the files with Papermill? Many thanks!


Solution

  • Try:

    jupyter trust mynotebook.ipynb
    

    As reference in official docs:

    https://jupyter-notebook.readthedocs.io/en/latest/notebook.html?highlight=trust#signing-notebooks