ahawker / ulid

Universally Unique Lexicographically Sortable Identifier (ULID) in Python 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API: from_timestamp should support ULID/Timestamp objects.

ahawker opened this issue · comments

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

  • When the given value is a Timestamp, a straight copy of all bytes should suffice.
  • When the given value is a ULID, a straight copy of the first 6 bytes should suffice.