Relative vs. Absolute imports for Flask and nose Relative vs. Absolute imports for Flask and nose flask flask

Relative vs. Absolute imports for Flask and nose


So for some weird reason, I managed to get the absolute imports to work after deleting the __init__.py file in the base level directory: i.e. my directory structure looks like follows:

├── README.md├── __init__.py├── constants.py├── businesspackage│   ├── README.md│   ├── __init__.py│   ├── __pycache__│   ├── detection│   ├── flagging_spec.txt│   └── tests├── requirements.txt├── run.py└── tests    ├── __init__.py    ├── __pycache__    └── test_api.py

I figured I should give it a try after seeing one of the answers on here: Python imports for tests using nose - what is best practice for imports of modules above current package . So now, all of my package is using absolute imports.