I am using google colaboratory for teaching Data Science with python and in order to leave the notebooks only with the specific lesson for the students I would like to impor
I have a dirty trick that does precisely this. With all my code in one package I can do
!wget mysite/mypackage.py from mypackage import *
Similarly if mypackage has dependencies, I can wget a zipfile and !unzip it