Release v1.0.0
Some checks failed
CI / Checks (push) Failing after 13m2s

This commit is contained in:
2025-08-20 21:00:50 +02:00
commit b4338e2769
401 changed files with 23576 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
from __future__ import annotations
import secrets
from uuid6 import UUID
def uuid7_from_timestamp(timestamp: int) -> UUID:
# The code below was shamelessly taken from `uuid6-python` package.
# Copyright (c) 2021 oittaa | MIT License
uuid_int = ((timestamp * 1_000) & 0xFFFFFFFFFFFF) << 80
uuid_int |= secrets.randbits(76)
return UUID(int=uuid_int, version=7)