MCPcopy Create free account
hub / github.com/BAI-LAB/MemoryOS / generate_id

Function generate_id

memoryos-pypi/utils.py:122–123  ·  view source on GitHub ↗
(prefix="id")

Source from the content-addressed store, hash-verified

120 return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
121
122def generate_id(prefix="id"):
123 return f"{prefix}_{uuid.uuid4().hex[:8]}"
124
125def ensure_directory_exists(path):
126 os.makedirs(os.path.dirname(path), exist_ok=True)

Calls

no outgoing calls

Tested by

no test coverage detected