File size: 201 Bytes
5b29309
 
 
 
 
 
 
1
2
3
4
5
6
7
8
import os
from datetime import datetime


def timestamped_filename(prefix: str = "output", ext: str = "csv") -> str:
    ts = datetime.now().strftime("%Y%m%d_%H%M%S")
    return f"{prefix}_{ts}.{ext}"