Sebastian Lenzlinger 577ac9e5cf UNTESTED REFACTORING:
Move more functionality into Metadata Model classes to ensure data is available and better passable between functions.
2024-05-07 18:58:54 +02:00

19 lines
423 B
Python

import uuid
from datetime import datetime
from iottb.definitions import TODAY_DATE_STRING, DEVICE_METADATA_FILE, CAPTURE_METADATA_FILE
from pathlib import Path
def get_iso_date():
return datetime.now().strftime('%Y-%m-%d')
def subfolder_exists(parent: Path, child: str):
return parent.joinpath(child).exists()
def generate_unique_string_with_prefix(prefix: str):
return prefix + "_" + str(uuid.uuid4())