Files
Chromy/chromy/handlers/add_data.py
T

11 lines
338 B
Python
Raw Normal View History

from __future__ import annotations
2026-04-21 17:42:37 +02:00
from chromy.command_inputs import AddDataInput
2026-04-22 15:47:46 +02:00
from chromy.utilities import ingest_file
2026-04-21 17:42:37 +02:00
def handle_add_data(command: AddDataInput) -> int:
records_added = ingest_file(command.collection, command.file)
print(f"Added {records_added} records to collection '{command.collection}'.")
2026-04-21 17:42:37 +02:00
return 0