Python bindings to Rust's UUID library.
Project description
FastUUID is a library which provides CPython bindings to Rust’s UUID library.
The provided API is exactly as Python’s builtin UUID class.
It is supported on Python 3.7, 3.8, 3.9, 3.10, 3.11 & 3.12.
Why?
It is much faster than Python’s pure-python implementation and it is stricter when parsing hexadecimal representation of UUIDs.
If you need to generate a lot of random UUIDs we also provide the uuid4_bulk() function which releases the GIL for the entire duration of the generation. This allows other threads to run while the library generates UUIDs.
Benchmarks
processor |
machine |
python compiler |
python implementation |
python implementation version |
python version |
python build |
release |
system |
cpu |
---|---|---|---|---|---|---|---|---|---|
x86_64 |
x86_64 |
GCC 5.5.0 |
CPython |
3.7.2 |
3.7.2 |
default |
4.15.0-50-generic |
Linux |
Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz |
name |
min |
max |
mean |
stddev |
median |
iqr |
outliers |
ops |
rounds |
iterations |
---|---|---|---|---|---|---|---|---|---|---|
tests/test_benchmarks.py::test_parse_bytes_fastuuid |
8.770148269832134e-07 |
3.0054012313485146e-05 |
9.848993185755912e-07 |
6.654121944953314e-07 |
9.530049283057451e-07 |
2.6979250833392143e-08 |
515;8080 |
1015332.2082162144 |
149366 |
1 |
tests/test_benchmarks.py::test_parse_bytes_uuid |
9.00006853044033e-07 |
2.4181994376704097e-05 |
1.0102117337399724e-06 |
6.361040394445994e-07 |
9.739887900650501e-07 |
3.899913281202316e-08 |
1130;10702 |
989891.4916557473 |
198020 |
1 |
tests/test_benchmarks.py::test_parse_bytes_le_fastuuid |
9.00996383279562e-07 |
2.4662993382662535e-05 |
1.0116569599011118e-06 |
5.687526428398989e-07 |
9.840005077421665e-07 |
2.200249582529068e-08 |
703;9368 |
988477.3590622543 |
163052 |
1 |
tests/test_benchmarks.py::test_parse_bytes_le_uuid |
1.348991645500064e-06 |
3.5200006095692515e-05 |
1.5184524591452776e-06 |
9.295692916442362e-07 |
1.448992406949401e-06 |
3.897002898156643e-08 |
1620;12511 |
658565.2346092485 |
170271 |
1 |
tests/test_benchmarks.py::test_parse_fields_fastuuid |
9.819923434406519e-07 |
3.2625976018607616e-05 |
1.217285795660234e-06 |
1.0234898538816672e-06 |
1.087988493964076e-06 |
6.702612154185772e-08 |
3199;12487 |
821499.7690477591 |
143844 |
1 |
tests/test_benchmarks.py::test_parse_fields_uuid |
1.1137977708131076e-06 |
0.000147809402551502 |
1.2054474234359692e-06 |
5.093104655522965e-07 |
1.144595444202423e-06 |
6.060581654310231e-08 |
2304;5896 |
829567.4954861335 |
167983 |
5 |
tests/test_benchmarks.py::test_parse_hex_fastuuid |
9.870273061096668e-07 |
2.906599547713995e-05 |
1.11212962918218e-06 |
6.906885628642859e-07 |
1.0759977158159018e-06 |
3.0995579436421394e-08 |
577;8272 |
899175.7559191765 |
143288 |
1 |
tests/test_benchmarks.py::test_parse_hex_uuid |
1.3360113371163607e-06 |
2.6262016035616398e-05 |
1.4448148991822913e-06 |
7.064083638385458e-07 |
1.3989920262247324e-06 |
2.9016518965363503e-08 |
679;4802 |
692130.1826039868 |
82156 |
1 |
tests/test_benchmarks.py::test_parse_int_uuid |
5.448004230856896e-07 |
4.164349229540676e-06 |
6.099919819231937e-07 |
2.0401652680352933e-07 |
5.548994522541762e-07 |
4.430039552971725e-08 |
3607;3925 |
1639365.8107557097 |
87951 |
20 |
tests/test_benchmarks.py::test_parse_int_fastuuid |
8.950009942054749e-07 |
4.946498665958643e-05 |
1.0105578493921953e-06 |
6.873330198387691e-07 |
9.739887900650501e-07 |
2.1012965589761734e-08 |
529;12534 |
989552.4542226401 |
176088 |
1 |
tests/test_benchmarks.py::test_fast_uuidv3 |
5.410998710431158e-07 |
3.5570512409321965e-06 |
5.971385425220447e-07 |
1.672736409563351e-07 |
5.526497261598707e-07 |
2.949964255094524e-08 |
4865;6332 |
1674653.248434526 |
83508 |
20 |
tests/test_benchmarks.py::test_uuidv3 |
3.6269775591790676e-06 |
4.193797940388322e-05 |
3.933511159797234e-06 |
1.4521217506191846e-06 |
3.782013664022088e-06 |
6.00120984017849e-08 |
548;4193 |
254225.79455743768 |
53582 |
1 |
tests/test_benchmarks.py::test_fast_uuidv4 |
1.47343598655425e-07 |
2.069187758024782e-06 |
1.6777362874701377e-07 |
7.169360028617447e-08 |
1.5453133528353646e-07 |
8.188180800061673e-09 |
6101;11550 |
5960412.297619802 |
198413 |
32 |
tests/test_benchmarks.py::test_uuidv4 |
2.275977749377489e-06 |
5.939402035437524e-05 |
2.5699563458422217e-06 |
1.316784132061215e-06 |
2.38200300373137e-06 |
1.309963408857584e-07 |
2068;5815 |
389111.667837409 |
85610 |
1 |
tests/test_benchmarks.py::test_fast_uuidv4_bulk_threads |
0.0009843519947025925 |
0.007268004992511123 |
0.0014418828965801719 |
0.0007545185495019851 |
0.0012059269938617945 |
0.0003288870066171512 |
42;54 |
693.5375975204223 |
549 |
1 |
tests/test_benchmarks.py::test_fast_uuidv4_threads |
0.0030693279986735433 |
0.008087011985480785 |
0.004009611603774935 |
0.000715605913448762 |
0.0038650799833703786 |
0.0006588477554032579 |
53;19 |
249.40071478707026 |
273 |
1 |
tests/test_benchmarks.py::test_uuidv4_threads |
0.030999513022834435 |
0.06895541000994854 |
0.040025271589084616 |
0.009975862168373506 |
0.036475206492468715 |
0.008713199000339955 |
3;2 |
24.98421522947798 |
22 |
1 |
tests/test_benchmarks.py::test_fast_uuidv5 |
5.316498572938144e-07 |
4.090600123163313e-06 |
5.890041556925782e-07 |
1.8620985914996815e-07 |
5.419497028924525e-07 |
2.9799412004649576e-08 |
3998;6415 |
1697780.8905680121 |
88921 |
20 |
tests/test_benchmarks.py::test_uuidv5 |
3.7190038710832596e-06 |
5.8079982409253716e-05 |
4.403547300216035e-06 |
2.439066121654033e-06 |
3.910012310370803e-06 |
2.169981598854065e-07 |
2283;4139 |
227089.64655629804 |
57383 |
1 |
Run them yourself to verify.
PRs are welcome.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file fastuuid-0.9.2.tar.gz
.
File metadata
- Download URL: fastuuid-0.9.2.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d1614e97dde9fa72d4a86081b374b23fdb0da9417f1b172533a2be019c70235 |
|
MD5 | 0a4bba4b99d1d1e649c2f56fb3463185 |
|
BLAKE2b-256 | 9ee81652b3b3f7d2eea5e09c69db733595f8b8057252e6b51315258f233aec54 |
File details
Details for the file fastuuid-0.9.2-cp312-none-win_amd64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp312-none-win_amd64.whl
- Upload date:
- Size: 167.3 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b35c43887a30f7f3f66d9698b23e319a8e2b833f26bed3f5377920f9bde2120 |
|
MD5 | e6247c788f16a057f9fc8bc70ece3066 |
|
BLAKE2b-256 | 7ba147c73d72bee3d7d8666135223a6a087343be8f2abffb9619f96bd188ab4a |
File details
Details for the file fastuuid-0.9.2-cp312-cp312-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 276.4 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbeb909a803581cef9838f5aba2cb201e86ccdc13fc01a5ab452061b5632d43c |
|
MD5 | a86b90c3cda393ed8f9032ca64de714b |
|
BLAKE2b-256 | 0b2b8e01b0c5517d36840d4dabf35cdb462d0a0bd1bc1ea06a7c3c5055e8a156 |
File details
Details for the file fastuuid-0.9.2-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 247.9 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 829dbf952ea6267cc4dfc5c95b0b01afd7bff0d3304fa48836a34511e038fffe |
|
MD5 | 02d63edfb0c8ab3d33282e905154bd77 |
|
BLAKE2b-256 | ac626cd9613f9bad9f6f46acfbdba10d4ef56d4ae20d58d27cbc159cb0c78ac4 |
File details
Details for the file fastuuid-0.9.2-cp311-none-win_amd64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp311-none-win_amd64.whl
- Upload date:
- Size: 167.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9db5839b4c8a834a0f46de7e1de4f67394d4801cceabc034c6a92cc5e3bc280 |
|
MD5 | c5b96ee9a3cf948f6b09165ab3088b85 |
|
BLAKE2b-256 | 88b54ff6b0725a4eda76527361986cdf0f44275b74989a940d2cfddeea670fe6 |
File details
Details for the file fastuuid-0.9.2-cp311-cp311-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 276.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f78b3161bb83774fca5819110b665aec8e5a80d8a29855b3e9f4192d269c2a3 |
|
MD5 | cc4e1298f1d2cca583e2941fe25495aa |
|
BLAKE2b-256 | b62eb0013128491bc96ffbcca0506b44016dd03b8fb97398f4f41d34da99deb0 |
File details
Details for the file fastuuid-0.9.2-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 247.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca3a2f73336259f4221a457239553803a8df1691476e0e41772ad8a766c370e1 |
|
MD5 | 7f36c75900cbbf8be946845eef80e7c1 |
|
BLAKE2b-256 | c6b28aebbed9dfa7764b1b32b08c4b4d7d1bbfeada648d4d3df8fff2fe537a67 |
File details
Details for the file fastuuid-0.9.2-cp310-none-win_amd64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp310-none-win_amd64.whl
- Upload date:
- Size: 167.3 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89804dcde28942bcd29bcfbd69bfcc312080868f4c615ed954ef7b84e7119b59 |
|
MD5 | 7cf5186d20fe340ad4676af51bd50367 |
|
BLAKE2b-256 | 0fa645415db887d8ee8500029d1b2dff131daf3721f16f7d8a291c48548c6879 |
File details
Details for the file fastuuid-0.9.2-cp310-cp310-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 276.4 kB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a53d469412650df2d8dbd8265e6d1c44fdd6a9494910a34b207829bb9620702c |
|
MD5 | 27777c508ecfa73557adc35448e05745 |
|
BLAKE2b-256 | e38b1288f3df7d7d9856800d1865efba3b52576b62b9336a07352b0ccfbbb032 |
File details
Details for the file fastuuid-0.9.2-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 247.9 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10dcb9fec079958e234c377fb097369652b7a4fe1adb8669a2d5cedc9bb8fdda |
|
MD5 | 47d610dc5cefd2a4395a6425fc42c353 |
|
BLAKE2b-256 | 75f64034fe00b0cd462e15f1e1e65805313536dfb49003bb838b2751e082068d |
File details
Details for the file fastuuid-0.9.2-cp39-none-win_amd64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp39-none-win_amd64.whl
- Upload date:
- Size: 167.3 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8061311ff392e36ce0cc9ad04681ec460a2bb94e0fd01048ff5ddd5088e7b7d |
|
MD5 | d466e537968bf4f9d8248de638cff5d5 |
|
BLAKE2b-256 | 0777d614b595e1c22fc21673dbee8cc3d0f995d6ac56d7edc78300a437154adc |
File details
Details for the file fastuuid-0.9.2-cp39-cp39-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp39-cp39-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 276.4 kB
- Tags: CPython 3.9, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d621269c9bfeae07d6190f69e38256fc1ba1ea0696a24f78b241fa0bd0c04a2 |
|
MD5 | a1e551145b10498c7f70a8c7a71fc603 |
|
BLAKE2b-256 | c781dbce437b6185980590d528b4012a137688eb9c431bba9af93272ad6384eb |
File details
Details for the file fastuuid-0.9.2-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 247.9 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3c29bf5fadc764ccfe80db2b41661234d8a6d68b7ccbc52adf89a0e22bd0cd8 |
|
MD5 | db876f182fda4df282400e80694bad26 |
|
BLAKE2b-256 | a7202aef856fa20f1246f2640f1146ac0fae7540af1e2c24c46076c5ef77814c |
File details
Details for the file fastuuid-0.9.2-cp38-none-win_amd64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp38-none-win_amd64.whl
- Upload date:
- Size: 167.6 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 395c7a98334bd0f430e2d8d137ad85a96db1fae6d1d450c8d138d7cab47e9a62 |
|
MD5 | 2021c2af78375787f87240625c3c3676 |
|
BLAKE2b-256 | 97d0d4fe7200aa30df0802ac6d91c9da40f9c9190faa71d2c74015be1d30149c |
File details
Details for the file fastuuid-0.9.2-cp38-cp38-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp38-cp38-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 276.8 kB
- Tags: CPython 3.8, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2053495256ad4d0b3e4dc507a583fac245aa7f3d0b36cf0ae4e496b84464b512 |
|
MD5 | c984cb0f83edf2d394ad28b89c5b8169 |
|
BLAKE2b-256 | eede2ac50f66b3fc645d2f69fc40b6fda741cf34e2f38979c238972a3180a8a0 |
File details
Details for the file fastuuid-0.9.2-cp38-cp38-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp38-cp38-macosx_11_0_arm64.whl
- Upload date:
- Size: 248.2 kB
- Tags: CPython 3.8, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8628fbaac685b30e4fc75b6656459cdb1b58372382d9c4ec5458a2f6c1fd0c60 |
|
MD5 | f1a6805221234e097ba83b507525834d |
|
BLAKE2b-256 | 185393b8af3f4351463b1d51acd6e7a4bdc42a29f712df33d12b04d4519e5f25 |
File details
Details for the file fastuuid-0.9.2-cp37-none-win_amd64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp37-none-win_amd64.whl
- Upload date:
- Size: 167.5 kB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1620d3154b3595c71cf409ef2207dcff65b2be4504490a7fef6808133db2199c |
|
MD5 | 72e86d84289c9ffc060b29640919e453 |
|
BLAKE2b-256 | a7420345ea8b1b7dd9e19b4951b5554e976bfd5ad5f471e8090ed39cf66871af |
File details
Details for the file fastuuid-0.9.2-cp37-cp37m-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: fastuuid-0.9.2-cp37-cp37m-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 276.8 kB
- Tags: CPython 3.7m, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3916fd7e0f9d157c61f49aa1de1aba043bcaa50c120207bda9a0c9fa228c5408 |
|
MD5 | fc40873ce57e55e0b04e553953f968b5 |
|
BLAKE2b-256 | 6a133b6f2a0ae5ef2345361805cdf15d38800764546af7bf1e515373ba17bb6e |