design - Best practices for creating a project utilities module? -
does know of best practices around creating utilities module or class specific project? have project i've been working on has 3 different moving pieces, keep in same project. directory structure looks like:
├── dir_a │ └── driver.py ├── dir_b │ └── driver.py ├── dir_c └── driver.py
each driver has common functions, want rip them out , throw them in utilities module project looks this:
├── dir_a │ └── driver.py ├── dir_b │ └── driver.py ├── dir_c │ └── driver.py └── utilities ├── __init__.py └── utilities.py
the problem i'm having i'm finding out driver files can't import utilities module without utilities dir being in pythonpath. best practice creating or adding project-specific modules , classes in general? adding utilities pythonpath seems clunky , inelegant. ideally project self-contained , wouldn't dependent on modifying environment run.
Comments
Post a Comment