While setting up the project in a clean environment, I noticed that just importing api.main crashes if dependencies like cv2, numpy, or ultralytics are not installed.
After debugging, this seems to come from a top-level import in src/file_manipulator.py:
from commonforms import prepare_form
Since commonforms pulls in heavy native dependencies at import time, the API fails to even start — even if that functionality is not used.
Impact
- API cannot start in minimal environments
- CI / Docker builds can fail
- makes onboarding harder for new contributors
Possible fix
Move the import inside the function where it’s used (lazy import) and handle missing dependency with a clear error message.