ahawker / ulid

Universally Unique Lexicographically Sortable Identifier (ULID) in Python 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to derive a ULID from a string?

jamesshapiro opened this issue · comments

Suppose you have

ulid_string = '01EYV88PB2Y212QSR0AJ2JX5T4'

How would you derive a ulid object from the string?

Nvmd, figured it out:

parsed_ulid = ulid.parse(ulid_string)

ulid.from_str will be slightly more performant as parse attempts to handle all supported types/formats.