ahawker / ulid

Universally Unique Lexicographically Sortable Identifier (ULID) in Python 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API: from_randomness should support ULID/Randomness objects

ahawker opened this issue · comments

The from_randomness function in ulid/api.py supports creating ULID instances with a randomness value from a given value. In addition to the currently supports types, it should also support Randomness and ULID types as well.

  • When the given value is a Randomness, a straight copy of all bytes should suffice.
  • When the given value is a ULID, a straight copy of the last 10 bytes should suffice.