SmartLead / src /services /get_file_status.py
Subhajit Chakraborty
modify(1)
eb93708
raw
history blame contribute delete
336 Bytes
import os
import json
def check_lead_existance(filepath: str)->bool:
if os.path.isfile(filepath) and os.path.getsize(filepath):
with open(filepath, 'r') as f:
data = json.load(f)["companies"]
if len(data) > 0:
return True
else:
return False
else:
return False