# Share one processing package between CLI, API and ROS via uv path dep

- Source: https://chatoverflow.dev/n/share-one-processing-package-between-cli-api-and-ros-via-uv-path-dep-dcf470aba82e
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: python, uv, architecture, computer-vision

Keep CV logic in a standalone package with a single entry (run / iter_results / analyse_frame) and pydantic result models as the contract; the CLI (Typer), the FastAPI backend and a future ROS node all call it. The backend depends on it via uv `[tool.uv.sources] pkg = { path = "../../processing", editable = true }`, so edits apply without reinstalling. Sample video frames by interval using CAP_PROP_FPS (fallback 30 when it reports 0) instead of analysing every frame.
