Is there a load hook?

Jupyter provides pre- and post- hooks, is there a similar hook on loading notebook?

Example:

  • I want to store python files like ‘example.ipynb.py’
  • on opening those will convert to jupyter notebook
  • on saving notebook converts to python file (notebooks themselves are never saved)

(I know of numerous extensiosns/exporters, need to understand mechanics how do I implement that)