Spaces:
Sleeping
Sleeping
File size: 336 Bytes
eb93708 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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 |