uuid-utils 0.2.0__cp310-cp310-musllinux_1_2_x86_64.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.

Potentially problematic release.


This version of uuid-utils might be problematic. Click here for more details.

@@ -0,0 +1,5 @@
1
+ from ._uuid_utils import *
2
+
3
+ __doc__ = _uuid_utils.__doc__
4
+ if hasattr(_uuid_utils, "__all__"):
5
+ __all__ = _uuid_utils.__all__
Binary file
@@ -0,0 +1,103 @@
1
+ Metadata-Version: 2.1
2
+ Name: uuid_utils
3
+ Version: 0.2.0
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: Programming Language :: Python
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Python :: 3 :: Only
8
+ Classifier: Programming Language :: Python :: 3.7
9
+ Classifier: Programming Language :: Python :: 3.8
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Rust
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: BSD License
16
+ Classifier: Operating System :: OS Independent
17
+ License-File: LICENSE.md
18
+ Summary: Drop-in replacement for Python UUID in Rust
19
+ Keywords: rust,uuid
20
+ Author-email: Amin Alaee <me@aminalaee.dev>
21
+ Requires-Python: >=3.7
22
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
23
+ Project-URL: Documentation, https://github.com/aminalaee/uuid-utils
24
+ Project-URL: Issues, https://github.com/aminalaee/uuid-utils/issues
25
+ Project-URL: Source, https://github.com/aminalaee/uuid-utils
26
+
27
+ # Python UUID Utils
28
+
29
+ <p align="center">
30
+ <a href="https://pypi.org/project/uuid-utils/">
31
+ <img src="https://badge.fury.io/py/uuid-utils.svg" alt="Package version">
32
+ </a>
33
+ <a href="https://pypi.org/project/uuid-utils" target="_blank">
34
+ <img src="https://img.shields.io/pypi/pyversions/uuid-utils.svg?color=%2334D058" alt="Supported Python versions">
35
+ </a>
36
+ </p>
37
+
38
+ ---
39
+
40
+ Python UUID implementation using Rust's UUID library.
41
+ This will make `uuid4` function around 10x faster.
42
+
43
+ This package can be a drop-in replacement to the standard library UUID
44
+ which implements existing UUID versions like V4 in Rust
45
+ and also adds draft UUID versions like V6.
46
+
47
+ Avaialble UUID versions:
48
+
49
+ - `uuid1` - Version 1 UUIDs using a timestamp and monotonic counter.
50
+ - `uuid3` - Version 3 UUIDs based on the MD5 hash of some data.
51
+ - `uuid4` - Version 4 UUIDs with random data.
52
+ - `uuid5` - Version 5 UUIDs based on the SHA1 hash of some data.
53
+ - `uuid6` - Version 6 UUIDs using a timestamp and monotonic counter.
54
+ - `uuid7` - Version 7 UUIDs using a Unix timestamp ordered by time.
55
+ - `uuid8` - Version 8 UUIDs using user-defined data.
56
+
57
+ <sup>Please note that UUID versions 6, 7 and 8 are still in draft RFC.</sup><br>
58
+
59
+ ## Installation
60
+
61
+ ```shell
62
+ $ pip install uuid-utils
63
+ ```
64
+
65
+ ## Example
66
+
67
+ ```shell
68
+ >>> import uuid_utils as uuid
69
+
70
+ >>> # make a random UUID
71
+ >>> uuid.uuid4()
72
+ UUID('ffe95fcc-b818-4aca-a350-e0a35b9de6ec')
73
+
74
+ >>> # make a random UUID using a Unix timestamp which is time-ordered.
75
+ >>> uuid.uuid7()
76
+ UUID('16ada4b8-b7b1-4e6c-b857-012bc678552b')
77
+
78
+ >>> # make a UUID using a SHA-1 hash of a namespace UUID and a name
79
+ >>> uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')
80
+ UUID('886313e1-3b8a-5372-9b90-0c9aee199e5d')
81
+
82
+ >>> # make a UUID using an MD5 hash of a namespace UUID and a name
83
+ >>> uuid.uuid3(uuid.NAMESPACE_DNS, 'python.org')
84
+ UUID('6fa459ea-ee8a-3ca4-894e-db77e160355e')
85
+ ```
86
+
87
+ ## Benchmarks
88
+
89
+ | Benchmark | Min | Max | Mean | Min (+) | Max (+) | Mean (+) |
90
+ |-----------------|---------|---------|---------|-----------------|-----------------|-----------------|
91
+ | UUID V1 | 0.058 | 0.059 | 0.058 | 0.005 (12.0x) | 0.005 (11.9x) | 0.005 (12.0x) |
92
+ | UUID V4 | 0.041 | 0.041 | 0.041 | 0.004 (11.1x) | 0.004 (10.8x) | 0.004 (10.9x) |
93
+ | UUID V5 | 0.064 | 0.066 | 0.065 | 0.008 (8.1x) | 0.008 (8.1x) | 0.008 (8.1x) |
94
+ | UUID from hex | 0.024 | 0.025 | 0.024 | 0.004 (6.7x) | 0.004 (6.6x) | 0.004 (6.6x) |
95
+ | UUID from bytes | 0.024 | 0.025 | 0.024 | 0.004 (6.7x) | 0.004 (6.6x) | 0.004 (6.7x) |
96
+ | UUID from int | 0.024 | 0.025 | 0.024 | 0.004 (6.6x) | 0.004 (6.7x) | 0.004 (6.6x) |
97
+
98
+ ## Limitations
99
+
100
+ - The `getnode` function is not available.
101
+ - The `uuid1` and `uuid6` take `node` argument as mandatory.
102
+ - The `uuid3` function is not available.
103
+
@@ -0,0 +1,7 @@
1
+ uuid_utils-0.2.0.dist-info/METADATA,sha256=pAAiPOVe3Ryf070TNqbdEyBGIEcvIjhC7Kg92p1w2Ro,3968
2
+ uuid_utils-0.2.0.dist-info/WHEEL,sha256=eKFEndJ-gORZqxqtfMV13mRn0nV5WusCnUxEG8E-AEA,109
3
+ uuid_utils-0.2.0.dist-info/license_files/LICENSE.md,sha256=DEf1K0xIS9BMeOfJaVQu6jGv5kT1h_O4qMzOhjUsYEY,1487
4
+ _uuid_utils.libs/libgcc_s-c05daeb7.so.1,sha256=bidBpjSUnVaSC9ZJ9cQjUJBsPnVg8oS3QIOWCebrupo,437537
5
+ _uuid_utils/__init__.py,sha256=w2wNldnniuYCsqIRYKqT7-lH45J1dn4o16C6cM7GAP8,127
6
+ _uuid_utils/_uuid_utils.cpython-310-x86_64-linux-gnu.so,sha256=Fw6PqE1VCPY6q9VeTZJdBlYmiuOPRfm8Z1Gk4E0KJSU,4610649
7
+ uuid_utils-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (0.14.16)
3
+ Root-Is-Purelib: false
4
+ Tag: cp310-cp310-musllinux_1_2_x86_64
@@ -0,0 +1,27 @@
1
+ Copyright © 2023, Amin Alaee.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+
14
+ * Neither the name of the copyright holder nor the names of its
15
+ contributors may be used to endorse or promote products derived from
16
+ this software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.