python-ulid 4.0.0__py3-none-any.whl → 4.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_ulid-4.0.0.dist-info → python_ulid-4.0.1.dist-info}/METADATA +1 -1
- python_ulid-4.0.1.dist-info/RECORD +10 -0
- ulid/__init__.py +6 -6
- python_ulid-4.0.0.dist-info/RECORD +0 -10
- {python_ulid-4.0.0.dist-info → python_ulid-4.0.1.dist-info}/WHEEL +0 -0
- {python_ulid-4.0.0.dist-info → python_ulid-4.0.1.dist-info}/entry_points.txt +0 -0
- {python_ulid-4.0.0.dist-info → python_ulid-4.0.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-ulid
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.1
|
|
4
4
|
Summary: Universally unique lexicographically sortable identifier
|
|
5
5
|
Project-URL: Homepage, https://github.com/mdomke/python-ulid
|
|
6
6
|
Project-URL: Documentation, https://python-ulid.readthedocs.io
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
ulid/__init__.py,sha256=RUAerfe39tcNib2oAREKB7U9DfF-rdXueNg3kF76zV8,21227
|
|
2
|
+
ulid/__main__.py,sha256=ZP8ZbhQ_o-O4Ckbba87bZ4NkwzrSFhAkrRLmUnzkW0Y,5586
|
|
3
|
+
ulid/base32.py,sha256=iUE5BGPW5Dul-Eu3ITvcymk8acNkIFAVTlrL12YIPKI,5961
|
|
4
|
+
ulid/constants.py,sha256=lbCLRNQXq8qnOdz_w-nJf_j5dC2X7Gjv-8GJUbs5jX8,503
|
|
5
|
+
ulid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
python_ulid-4.0.1.dist-info/METADATA,sha256=LuILMUf_zi1x8OonhM9KEuPdygFqPs9R4ubHAMxn6fQ,8758
|
|
7
|
+
python_ulid-4.0.1.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
8
|
+
python_ulid-4.0.1.dist-info/entry_points.txt,sha256=9214ghzfSgS8a-TjjlWDF7bI7KSaeewOCBKn5uz7bdU,50
|
|
9
|
+
python_ulid-4.0.1.dist-info/licenses/LICENSE,sha256=DiDPNhW5yUHIqaKowvX0c1c9xWiI0xW4ji8R9N2NJbw,1056
|
|
10
|
+
python_ulid-4.0.1.dist-info/RECORD,,
|
ulid/__init__.py
CHANGED
|
@@ -456,9 +456,9 @@ class ULID:
|
|
|
456
456
|
Examples:
|
|
457
457
|
|
|
458
458
|
>>> ulid = ULID()
|
|
459
|
-
>>> uuid7 = ulid.
|
|
460
|
-
>>> assert ULID.
|
|
461
|
-
>>> uuid7_compliant = ulid.
|
|
459
|
+
>>> uuid7 = ulid.to_uuid7() # Perfect round-trip
|
|
460
|
+
>>> assert ULID.from_uuid7(uuid7) == ulid
|
|
461
|
+
>>> uuid7_compliant = ulid.to_uuid7(compliant=True) # RFC 4122 compliant
|
|
462
462
|
>>> uuid7_compliant.version
|
|
463
463
|
7
|
|
464
464
|
"""
|
|
@@ -487,17 +487,17 @@ class ULID:
|
|
|
487
487
|
return uuid.UUID(bytes=uuid_bytes)
|
|
488
488
|
|
|
489
489
|
@classmethod
|
|
490
|
-
def
|
|
490
|
+
def from_uuid7(cls, value: uuid.UUID) -> Self:
|
|
491
491
|
"""Create a new :class:`ULID` from a UUIDv7 (:class:`uuid.UUID` version 7).
|
|
492
492
|
|
|
493
493
|
Extracts the timestamp from the UUIDv7's first 48 bits (milliseconds since epoch)
|
|
494
494
|
and the remaining 80 bits as randomness. The timestamp is always transparently
|
|
495
|
-
preserved, providing perfect round-trip conversion with :meth:`
|
|
495
|
+
preserved, providing perfect round-trip conversion with :meth:`to_uuid7`.
|
|
496
496
|
|
|
497
497
|
Examples:
|
|
498
498
|
|
|
499
499
|
>>> uuid7 = uuid.UUID("01936c5e-f4c0-7000-8000-000000000000")
|
|
500
|
-
>>> ulid = ULID.
|
|
500
|
+
>>> ulid = ULID.from_uuid7(uuid7)
|
|
501
501
|
>>> ulid.datetime
|
|
502
502
|
datetime.datetime(2025, 11, 10, ...)
|
|
503
503
|
"""
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
ulid/__init__.py,sha256=kn3vK2Evw0zzVnyO_2qNNYa8UQS0_VjVz30r65ZHJ0Y,21233
|
|
2
|
-
ulid/__main__.py,sha256=ZP8ZbhQ_o-O4Ckbba87bZ4NkwzrSFhAkrRLmUnzkW0Y,5586
|
|
3
|
-
ulid/base32.py,sha256=iUE5BGPW5Dul-Eu3ITvcymk8acNkIFAVTlrL12YIPKI,5961
|
|
4
|
-
ulid/constants.py,sha256=lbCLRNQXq8qnOdz_w-nJf_j5dC2X7Gjv-8GJUbs5jX8,503
|
|
5
|
-
ulid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
python_ulid-4.0.0.dist-info/METADATA,sha256=K2ql6NKIOsg2iB4LyUZXqyjItV9leSJFDcI3_aDsnXU,8758
|
|
7
|
-
python_ulid-4.0.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
8
|
-
python_ulid-4.0.0.dist-info/entry_points.txt,sha256=9214ghzfSgS8a-TjjlWDF7bI7KSaeewOCBKn5uz7bdU,50
|
|
9
|
-
python_ulid-4.0.0.dist-info/licenses/LICENSE,sha256=DiDPNhW5yUHIqaKowvX0c1c9xWiI0xW4ji8R9N2NJbw,1056
|
|
10
|
-
python_ulid-4.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|