22 lines
694 B
Python
22 lines
694 B
Python
from typing import Optional, List, Dict
|
|
import csv
|
|
import io
|
|
import os
|
|
import json
|
|
from datetime import datetime
|
|
from sqlalchemy.orm import Session
|
|
from app.db.database import transaction
|
|
from app.models.inventory import Inventory
|
|
from app.models.tcgplayer_product import TCGPlayerProduct
|
|
from app.services.inventory_service import InventoryService
|
|
|
|
class FileProcessingService:
|
|
def __init__(self, cache_dir: str = "app/data/cache/tcgplayer"):
|
|
self.cache_dir = cache_dir
|
|
self.inventory_service = InventoryService()
|
|
os.makedirs(cache_dir, exist_ok=True)
|
|
|
|
def _get_cache_path(self, filename: str) -> str:
|
|
return os.path.join(self.cache_dir, filename)
|
|
|