ShortUUIDs

Provides a wrapper around the ShortUUID module with a long-term stable alphabet. This module may be used directly or via coaster.utils:

import coaster.shortuuid

# Generate a ShortUUID
su = coaster.shortuuid.suuid()

# Decode a ShortUUID into a UUID
uu = coaster.shortuuid.decode(su)

# Encode a UUID into a ShortUUID
su2 = coaster.shortuuid.encode(uu)

# Or use the same functions via coaster.utils (recommended)
from coaster.utils import suuid, suuid2uuid, uuid2suuid
coaster.shortuuid.suuid()[source]

Return a ShortUUID using the UUIDv4 version

coaster.shortuuid.encode(uuid)[source]

Encode a UUID into a ShortUUID

coaster.shortuuid.decode(uuid)[source]

Decode a ShortUUID into a UUID