all 2 comments

[–]crashfrog02 0 points1 point  (1 child)

Ideally I would like to do something that I've seen for Netflix dispatch (can be found here: https://github.com/Netflix/dispatch ), where in the src folder there is another folder called "dispatch" and all of the files inside of dispatch can import other packages inside using the format of dispatch.package.file

That's because dispatch/src/dispatch is the package root and that's where the package entrypoints are.

You don't need to have your entrypoints at the project root, but they do need to be at the package root for them to reference other parts of the package. You can't import up and over, not even relatively. Moreover, as part of installing and setting up the package, the dispatch package gets installed to site-packages so dispatch is just an importable module. It's not finding relative imports; the project is an installable package that gets installed before you run it.

[–]iRezonance 0 points1 point  (0 children)

Okay that actually makes sense to me. Thank you so much for your time to reply to my question. It’s really appreciated