src/my_proj/processors/simple_processor.py notebooks/nb1.py
src/proj
and, from notebook nb1.py
, importfrom processors.simple_processor import SimpleProcessor
sys.path
at the beginning of every notebook, that's fine, but some tools expect/allow base directories to be specified in pyproject.toml
sys.path
, if that's your project structure. I personally would make processors
a package and do an editable install of it, so I didn't need to modify sys.path
. But I understand you may have other constraints.pyproject.toml
s to find reasonable examples –