Skip to main content

Python bindings to Rust's UUID library.

Project description

https://travis-ci.com/thedrow/fastuuid.svg?branch=master

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.

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.

What’s Missing?

  • UUIDv1 generation

PRs are welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastuuid-0.9.1.tar.gz (19.7 kB view details)

Uploaded Source

Built Distributions

fastuuid-0.9.1-cp312-none-win_amd64.whl (165.1 kB view details)

Uploaded CPython 3.12 Windows x86-64

fastuuid-0.9.1-cp312-cp312-manylinux_2_34_x86_64.whl (273.4 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.34+ x86-64

fastuuid-0.9.1-cp312-cp312-macosx_11_0_arm64.whl (245.6 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

fastuuid-0.9.1-cp311-none-win_amd64.whl (165.0 kB view details)

Uploaded CPython 3.11 Windows x86-64

fastuuid-0.9.1-cp311-cp311-manylinux_2_34_x86_64.whl (273.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.34+ x86-64

fastuuid-0.9.1-cp311-cp311-macosx_11_0_arm64.whl (245.6 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

fastuuid-0.9.1-cp310-none-win_amd64.whl (165.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

fastuuid-0.9.1-cp310-cp310-manylinux_2_34_x86_64.whl (273.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.34+ x86-64

fastuuid-0.9.1-cp310-cp310-macosx_11_0_arm64.whl (245.6 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

fastuuid-0.9.1-cp39-none-win_amd64.whl (164.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

fastuuid-0.9.1-cp39-cp39-manylinux_2_34_x86_64.whl (273.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.34+ x86-64

fastuuid-0.9.1-cp39-cp39-macosx_11_0_arm64.whl (245.5 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

fastuuid-0.9.1-cp38-none-win_amd64.whl (165.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

fastuuid-0.9.1-cp38-cp38-manylinux_2_34_x86_64.whl (273.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.34+ x86-64

fastuuid-0.9.1-cp38-cp38-macosx_11_0_arm64.whl (245.9 kB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

fastuuid-0.9.1-cp37-none-win_amd64.whl (165.2 kB view details)

Uploaded CPython 3.7 Windows x86-64

fastuuid-0.9.1-cp37-cp37m-manylinux_2_34_x86_64.whl (273.8 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.34+ x86-64

File details

Details for the file fastuuid-0.9.1.tar.gz.

File metadata

  • Download URL: fastuuid-0.9.1.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for fastuuid-0.9.1.tar.gz
Algorithm Hash digest
SHA256 d9d91ecb680ff59430ba0c7acfa070f0c6fc50295abb3eacc33db6a486bcbd9d
MD5 5b90ddb798db632abd5e0ce530b2cab4
BLAKE2b-256 838aa22213f069b735983d687ec110a16e7be1b09fa6562a5e48d636fca1a0c4

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp312-none-win_amd64.whl.

File metadata

  • Download URL: fastuuid-0.9.1-cp312-none-win_amd64.whl
  • Upload date:
  • Size: 165.1 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for fastuuid-0.9.1-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 4185c5265508b19cb5d0e2a9a86dc14bf3e58d7e0019b8f82f1683318bb19c73
MD5 a0eb8d2678b803191f400f7bc709f87e
BLAKE2b-256 c18dba418af4783d798a707e32dda4a9ba23a8619352abe01a4ad240dd37e5d5

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6fca48935035ead43a7375f9d7d559e5828ca02504273cdc85ffe7ed016dd18c
MD5 a7c92703b519570a5cf50ac624fcbf48
BLAKE2b-256 97a07664d88ca26b0df409de33e99e83ee32444145451d9aedbfe77b7d39fe55

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 478874f6c049f73105a769a6dcd4068707527bab8e5540cb04f07e3887286bbe
MD5 184199933328dbf234edcb64acd25038
BLAKE2b-256 41b84d4af573b4b40240c3af390fd93cd8b6dcf2d9a3fa9e738a96c56a1c1eb6

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp311-none-win_amd64.whl.

File metadata

  • Download URL: fastuuid-0.9.1-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 165.0 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

Hashes for fastuuid-0.9.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 f7554d6d9fb877ab60476f34343d6fa29fa6f74055d1af3ffb1ced735d40fe7c
MD5 20668698eec9196cdb1177d98ccbc1f9
BLAKE2b-256 0e6a86007fa434dd6045530c804610bf7fdb3205d7c021f6212722a1e35b97d8

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 661ad10e995c508a61f981238a4590a92229062f53318b9dc953075b5f397463
MD5 132487ccdbbb8056624788ea27b23323
BLAKE2b-256 faf548cdbac0748160e09bc668e8a06274bb72294ee278a39e37b3daf6f15aab

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3368a7ee1ba7fbfcb08638369ab9697032591e8f9351d374956b605a92b1e02a
MD5 fecc48f8488ea2ba0fb038a87e4d8fb9
BLAKE2b-256 c82ee397ec01450ed3ad17a853e5bbc360c35298520583d7ff0ae58af3155813

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp310-none-win_amd64.whl.

File metadata

  • Download URL: fastuuid-0.9.1-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 165.0 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

Hashes for fastuuid-0.9.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 d3437c1b5d1d9432db8ad8ce049e1f5b65276882526687943056775697eda45a
MD5 0a4ae8f5c273fcf3c9528aaba9cfa881
BLAKE2b-256 595871b6212d51d5fd17c50f588425c1772d9e4f2ca14b690db457b1d829fa43

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 da810a13dc7a67a1d6bc550ef02e5e1676a07841e2a8a6a7cc94180854e8687d
MD5 ebc50bfce153023fecaa1a782217dc3d
BLAKE2b-256 1ec7757af10e790ed44a740f70076f7e2865cb5c1a27f67987b03c8a38d3911e

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 50af71d057633f4b9fb0269482521c815dff8b5b634e3cd214923f976a95db18
MD5 7ad344adf61af5632cc9f6667eec757b
BLAKE2b-256 051305eba4388ea7ae8809c99588ca80c5d66f3108553071f5088e83a0fc6487

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp39-none-win_amd64.whl.

File metadata

  • Download URL: fastuuid-0.9.1-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 164.9 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

Hashes for fastuuid-0.9.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 4bfbd9894977375e540e2b3160835254812a818e581a17b0b20360ca88fcd19c
MD5 6547bb676224a6c2677b6d0fdfc3ef21
BLAKE2b-256 648eb01a195c5bf40ffc201c804e4f872759a1396fd232a1b5923311015006cc

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e6a8649b3b2c8ecf7eba82fa686f3549db2690ad0faf619934ff3736186c889b
MD5 7c5845a2fbf2f593d374efd876e124fd
BLAKE2b-256 2cad69f304400f9da32107b700ba68fd0057ea7543282d7fc52b106575113084

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0c7809f218f416c6223bb060b1cde6f648981519f11b7f735813558e33e0c83
MD5 d9b46c8c1808056808b03b3aa4781c3d
BLAKE2b-256 a44e64f6bc476a1cd8b5997ecf055f8051ce4b7ec32e72e86908a0eaa3225269

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp38-none-win_amd64.whl.

File metadata

  • Download URL: fastuuid-0.9.1-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 165.3 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

Hashes for fastuuid-0.9.1-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 956f1d13a550b19bcb102c64ba7914462064e1d61f6241df6f86bf94e53a9963
MD5 aaf949369c09160a3a80f1f644ef74c6
BLAKE2b-256 b1c6aaf0dd0b6ccccd52555eca03a54884e4f8047b5567c8d94e3e5c47b4b825

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 644f5ac856d239f6a1cedd0b71e18f214e138c707730ba49b23fcf1da2971a61
MD5 dd0819be12d097b6c55276f5c5832ee3
BLAKE2b-256 9bf1fe292df64a40da28c76b167704df157ed379fe59feb9b0c6da11f39e0f77

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0771ee16a94105bb9e163cb15c64eb61d384e7d5c341b501e94d6c5ef01f0b68
MD5 5c4d606c401a9c2461ac165c8c9514fa
BLAKE2b-256 2a0e8700f05c5a4936737e547c8003d488f75c55bc2fef8c97224938d22d3966

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp37-none-win_amd64.whl.

File metadata

  • Download URL: fastuuid-0.9.1-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 165.2 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

Hashes for fastuuid-0.9.1-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 fa764a26c64aebca11e0ff1df9fa593fa8b5451ad9fe68180485cf150b85a802
MD5 c1322cf00b55e5d4cf1bf75f7f8f85b5
BLAKE2b-256 ff24709339767ca964f7968a8f338eb597b9f8b463db35ed601054aa1d0642c9

See more details on using hashes here.

File details

Details for the file fastuuid-0.9.1-cp37-cp37m-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for fastuuid-0.9.1-cp37-cp37m-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ee280eeafdcb5adc8f2b112d94bfbbbd81359a320b1d0840dd835593e631ce92
MD5 cfa0b966d84a8c0fcf01d25708726df5
BLAKE2b-256 32a9926c35376411d847e807549316a86c1f608af9ae7303793a23d09ab6fd56

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page