A small utility for importing Python modules using paths relative to the calling script — without modifying your project structure.
Modifies sys.path, which is maybe kinda janky, but it works and will make life easier than having to run pip install -e . in every project.
Questions? Ask at https://github.com/michaelboerman/import_parent/issues
pip install import-parentfrom import_parent import add_parent_to_path
add_parent_to_path("..")- the name on PyPI is
import-parent(with a hyphen), but when you load it in python, you need to useimport_parent(with an underscore)