You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue requests adding support for Video and Frame object mappers (OM) so users can interact with them natively in Python. While Videos (in aperturedb/Videos.py) and Frames (in aperturedb/Images.py) were introduced to the Object Mapper in late 2022, full ingestion support for Frames via CSV is currently missing, as is CLI support for IngestType.FRAME.
Here are three possible approaches to fully resolve this:
Approach A: Add a standalone FrameDataCSV.py
We can create aperturedb/FrameDataCSV.py containing a new class that duplicates the loading logic of ImageDataCSV but sets self.command = "AddFrame", and register it in aperturedb/cli/ingest.py.
Pros:
Leaves ImageDataCSV.py completely untouched.
Plugs the missing IngestType.FRAME hole in the CLI.
Cons:
Duplicates complex image validation and S3/GCS fetching logic.
Approach B: Refactor ImageDataCSV to easily support Frames
We modify aperturedb/ImageDataCSV.py to allow self.command to be overridden. Then we create aperturedb/FrameDataCSV.py which simply inherits from ImageDataCSV and overrides self.command = "AddFrame". We also add it to ingest_types in aperturedb/cli/ingest.py.
Pros:
DRY (Don't Repeat Yourself) — reuses all the robustness of ImageDataCSV.
Clean and maintainable design.
Cons:
Requires a small modification to the __init__ of ImageDataCSV.py (around line 202).
Approach C: Close issue as already completed
We can assume the OM requirement was met by Videos.py and Frames (in Images.py) and simply close the issue without adding CSV ingestion support.
Pros:
Zero code changes required.
Cons:
Users using the CLI adb ingest from-csv with IngestType.FRAME will encounter a KeyError in aperturedb/cli/ingest.py.
Recommendation:
I recommend Approach B. Since Frames share the same validation and ingestion requirements as Images, FrameDataCSV can simply inherit from ImageDataCSV. We just need to change self.command = "AddImage" to self.command = getattr(self, "command", "AddImage") in ImageDataCSV.py, create aperturedb/FrameDataCSV.py, and register IngestType.FRAME: FrameDataCSV in aperturedb/cli/ingest.py (around line 147). This ensures parity for Frames across both the OM and ingestion utilities.
Activity
ad-claw000 commentedon Aug 12, 2026
This issue requests adding support for Video and Frame object mappers (OM) so users can interact with them natively in Python. While
Videos(inaperturedb/Videos.py) andFrames(inaperturedb/Images.py) were introduced to the Object Mapper in late 2022, full ingestion support for Frames via CSV is currently missing, as is CLI support forIngestType.FRAME.Here are three possible approaches to fully resolve this:
Approach A: Add a standalone
FrameDataCSV.pyWe can create
aperturedb/FrameDataCSV.pycontaining a new class that duplicates the loading logic ofImageDataCSVbut setsself.command = "AddFrame", and register it inaperturedb/cli/ingest.py.ImageDataCSV.pycompletely untouched.IngestType.FRAMEhole in the CLI.Approach B: Refactor
ImageDataCSVto easily support FramesWe modify
aperturedb/ImageDataCSV.pyto allowself.commandto be overridden. Then we createaperturedb/FrameDataCSV.pywhich simply inherits fromImageDataCSVand overridesself.command = "AddFrame". We also add it toingest_typesinaperturedb/cli/ingest.py.ImageDataCSV.__init__ofImageDataCSV.py(around line 202).Approach C: Close issue as already completed
We can assume the OM requirement was met by
Videos.pyandFrames(inImages.py) and simply close the issue without adding CSV ingestion support.adb ingest from-csvwithIngestType.FRAMEwill encounter a KeyError inaperturedb/cli/ingest.py.Recommendation:
I recommend Approach B. Since Frames share the same validation and ingestion requirements as Images,
FrameDataCSVcan simply inherit fromImageDataCSV. We just need to changeself.command = "AddImage"toself.command = getattr(self, "command", "AddImage")inImageDataCSV.py, createaperturedb/FrameDataCSV.py, and registerIngestType.FRAME: FrameDataCSVinaperturedb/cli/ingest.py(around line 147). This ensures parity for Frames across both the OM and ingestion utilities.