is it ever valid to create a flow inside of a pack...
# ask-metaflow
m
is it ever valid to create a flow inside of a package? ex: if my directory structure is like:
Copy code
package_dir/
    __init__.py
    flows.py
    shared_code.py
And say that
flows.py
looks something like
Copy code
from metaflow import FlowSpec, step

from package_dir import shared_code
 
 
class ExampleFlow(FlowSpec):
    ...
 
if __name__ == "__main__":
    ExampleFlow()
if I try to run this like this:
Copy code
python -m package_dir.flows run
I get a
ModuleNotFoundError
when trying to import the
shared_code
module, but that import works when I comment out the
ExampleFlow()
call and replace it with something like
print("Hello world!")
,