MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / encode_uuid

Function encode_uuid

methods/cognee/shared/encode_uuid.py:4–15  ·  view source on GitHub ↗
(uuid: UUID)

Source from the content-addressed store, hash-verified

2
3
4def encode_uuid(uuid: UUID) -> str:
5 uuid_int = uuid.int
6 base = 52
7 charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
8
9 encoded = ""
10 while len(encoded) < 36:
11 uuid_int, remainder = divmod(uuid_int, base)
12 uuid_int = uuid_int * 8
13 encoded = charset[remainder] + encoded
14
15 return encoded

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected