Generate a unique id using timestamp and UUID.
(prefix: str = "session")
| 38 | return clean |
| 39 | |
| 40 | def generate_unique_id(prefix: str = "session") -> str: |
| 41 | """Generate a unique id using timestamp and UUID.""" |
| 42 | timestamp = datetime.now().strftime("%Y%m%d-%H%M%S") |
| 43 | unique_id = str(uuid.uuid4())[:8] |
| 44 | return f"{prefix}_{timestamp}_{unique_id}" |
no outgoing calls
no test coverage detected