Files
Chromy/chromy/handlers/import_data.py
T

10 lines
270 B
Python
Raw Normal View History

from __future__ import annotations
2026-04-21 17:42:37 +02:00
2026-04-22 15:47:46 +02:00
from chromy.utilities import ingest_file
2026-04-21 17:42:37 +02:00
2026-04-23 19:34:59 +02:00
def handle_import(collection: str, file: str) -> int:
2026-04-22 22:14:26 +02:00
records_added = ingest_file(collection, file)
print(f"Added {records_added} records to collection '{collection}'.")
2026-04-21 17:42:37 +02:00
return 0