mirror of
https://github.com/ComposioHQ/composio.git
synced 2026-09-22 11:46:35 +08:00
9e002c5ca3
Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>
18 lines
380 B
Python
18 lines
380 B
Python
"""UUID utility functions for Composio SDK."""
|
|
|
|
import uuid
|
|
|
|
|
|
def generate_uuid() -> str:
|
|
"""Generate a random UUID v4 string."""
|
|
return str(uuid.uuid4())
|
|
|
|
|
|
def generate_short_id() -> str:
|
|
"""
|
|
Generate a short ID (8 characters) from a UUID.
|
|
|
|
Returns the first 8 characters of a UUID with dashes removed.
|
|
"""
|
|
return generate_uuid()[:8].replace("-", "")
|