Cython implementation of ksuid
Project description
CyKSUID
A high performance Cython implementation of KSUID (K-Sortable Globally Unique IDs).
LICENSE
New BSD. See License File.
Install
cyksuid
is on the Python Package Index
(PyPI):
pip install cyksuid
Dependencies
cyksuid
supports Python 3.7+ with a common codebase. It is developed
in Cython, but requires no dependency other than CPython and a C
compiler.
Sample Usage
v1 API
from cyksuid import ksuid, parse
uid = ksuid.ksuid()
uid.bytes # b'\x0f\xd4oB\x81I\xe5\x8d\x95\xb5\xeb\xbc"\xa0\xcd\xfe)N\xe0I'
uid.hex # '0fd46f428149e58d95b5ebbc22a0cdfe294ee049'
uid.datetime # datetime.datetime(2022, 10, 12, 13, 12, 34)
uid.timestamp # 1665580354
uid.encoded # b'2G2IfS6177qFICE3w10eMjgYu89'
parse(uid.encoded)
v2 API
from cyksuid.v2 import ksuid, parse
uid = ksuid()
uid.bytes # b'\x0f\xd4oB\x81I\xe5\x8d\x95\xb5\xeb\xbc"\xa0\xcd\xfe)N\xe0I'
uid.hex # '0fd46f428149e58d95b5ebbc22a0cdfe294ee049'
uid.datetime # datetime.datetime(2022, 10, 12, 13, 12, 34, tzinfo=datetime.timezone.utc)
uid.timestamp # 1665580354.0
uid.encoded # b'2G2IfS6177qFICE3w10eMjgYu89'
str(uid) # '2G2IfS6177qFICE3w10eMjgYu89'
parse(uid.encoded)
Benchmark
--------------------------------------------------------------------------------------- benchmark 'test_generate': 2 tests ---------------------------------------------------------------------------------------
Name (time in ns) Min Max Mean StdDev Median IQR Outliers OPS (Kops/s) Rounds Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_generate[cyksuid] 374.9997 (1.0) 16,666.9997 (1.0) 490.1096 (1.0) 127.4882 (1.0) 458.9997 (1.0) 42.0000 (1.0) 13826;14525 2,040.3599 (1.0) 175193 1
test_generate[svix] 1,250.0000 (3.33) 22,290.9998 (1.34) 1,483.5142 (3.03) 796.5151 (6.25) 1,416.0000 (3.08) 42.0000 (1.0) 114;1573 674.0751 (0.33) 13676 1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------- benchmark 'test_parse': 2 tests -----------------------------------------------------------------------------------------
Name (time in ns) Min Max Mean StdDev Median IQR Outliers OPS (Kops/s) Rounds Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_parse[cyksuid] 191.6400 (1.0) 1,250.0000 (1.0) 201.6890 (1.0) 13.9646 (1.0) 200.0000 (1.0) 5.0000 (1.0) 2667;6555 4,958.1283 (1.0) 190477 25
test_parse[svix] 12,042.0000 (62.84) 129,332.9997 (103.47) 12,452.2963 (61.74) 1,232.3979 (88.25) 12,292.0001 (61.46) 125.0000 (25.00) 890;4344 80.3065 (0.02) 28674 1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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
cyksuid-2.0.0.tar.gz
(99.8 kB
view hashes)
Built Distributions
cyksuid-2.0.0-cp311-cp311-win32.whl
(223.2 kB
view hashes)
cyksuid-2.0.0-cp310-cp310-win32.whl
(223.0 kB
view hashes)
cyksuid-2.0.0-cp39-cp39-win_amd64.whl
(251.4 kB
view hashes)
cyksuid-2.0.0-cp39-cp39-win32.whl
(223.9 kB
view hashes)
cyksuid-2.0.0-cp38-cp38-win_amd64.whl
(251.4 kB
view hashes)
cyksuid-2.0.0-cp38-cp38-win32.whl
(224.1 kB
view hashes)
cyksuid-2.0.0-cp37-cp37m-win32.whl
(223.5 kB
view hashes)
Close
Hashes for cyksuid-2.0.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 363e88935abf634c0bda3727ef0f55f761cb250ce905dcbed19eb849ca9bd7f1 |
|
MD5 | f7f7aff56fc55f4b0a44ff0110c312a9 |
|
BLAKE2b-256 | 3ff831ad61c0e61db30a89bee69f7e479f5dd152a527931a201adf0f8e210908 |
Close
Hashes for cyksuid-2.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37ecf563fbdca74532751ed46ba5b7413f7bfe1b99a49b88e029d515f8a1cbae |
|
MD5 | 61fc75985cd0b6e1a5a0789dc741e10e |
|
BLAKE2b-256 | b62b4e59e55ea19d7d8042fe11da95ab10e9052d37f017e020e1a2dd15202418 |
Close
Hashes for cyksuid-2.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44f87ce358f38747ea5d7c69ba43401c538ea9889c28eacba25f1d52d7b4054c |
|
MD5 | 69f1f6ff2ec8bc92973a29d70377cc55 |
|
BLAKE2b-256 | 33163396a9b9275f9b534cc1fc605559a0b00932856ecfd77dbf290f691c121d |
Close
Hashes for cyksuid-2.0.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 776420c2a1c4ee1cb40c4aa18ddf47aad82cc8ebc60eb76eeff0ad05e337aab3 |
|
MD5 | a0fe4eae37752e26a26981fc03a05af0 |
|
BLAKE2b-256 | 05a085c995383bbde7830880c84af32b9808f0c218a9ee25cf367a0676fc96a4 |
Close
Hashes for cyksuid-2.0.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dae5612192097c09e40231ef5142d7dbf99fdd45472b89c4b7c5bac1bbe36e30 |
|
MD5 | 1d0de1e5a6745721d9112ac31eede271 |
|
BLAKE2b-256 | 804adbdd02808e2824dc74df3cc2c41953cb9efedb8a5821369d0a5bfe076f49 |
Close
Hashes for cyksuid-2.0.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33507bd4d3d6d1afba386b1ea850d7e6f15824a72a033f937773de392f902a88 |
|
MD5 | fb15f0100569931871f1569525d92fc0 |
|
BLAKE2b-256 | 06803010b536bb06164f0ff64e0a0cbcaec570516868f69b47e2aefe056a01b7 |
Close
Hashes for cyksuid-2.0.0-pp37-pypy37_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ec50a48b6042e5529cc57dec849866981c1d8c9daa139f83e9c078584873c04 |
|
MD5 | 624ce09e6f2f55ac5e56d4de3d1c515d |
|
BLAKE2b-256 | 9008090d42a1fb05f885708a7fd3b712f9243dc26cd4f61f0ced31b636bc0dd3 |
Close
Hashes for cyksuid-2.0.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35914ecb4f1b0884392d58a35ee1e302d864d2398e26489e3e9048d27841e725 |
|
MD5 | 0b5f66678ca144791f3430bff9684927 |
|
BLAKE2b-256 | 9136911c6ac369c44b93a0fc9c94bfa71b10d2c642cfb5ee963449460a51462c |
Close
Hashes for cyksuid-2.0.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 629144c0e8c0d53aa7add489ce840d7bdc86f9a8ce217a84170c49075990f3ff |
|
MD5 | 902a1e3f1749b72f3a0b1c062a75c1e6 |
|
BLAKE2b-256 | fbfdf7ca722df630739cad9044b16e9f26e26e652b42b5404ec2d887cc99edd0 |
Close
Hashes for cyksuid-2.0.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33bbdd511fb527baf46ca690785205e76423285888041040fe40909c6692e44f |
|
MD5 | db25b72ada7db5364d4ef8efb34dc2bc |
|
BLAKE2b-256 | 8f4bf878d5d4c9268c309c69c41a645a771879a5dd355c044a3e3aaec1170b40 |
Close
Hashes for cyksuid-2.0.0-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83c4f28a4177e2e85b949e078ab022c7b1c0c55dade7e1a848a63aed2a95445f |
|
MD5 | 95d0d6a782d00ce35d3d74b8c5caf2ee |
|
BLAKE2b-256 | b91fb069f91e6d2223e6a8415beee6f543a35717a6bf9bf71b1718f6b218f164 |
Close
Hashes for cyksuid-2.0.0-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da1ab0bf23e69d2f9d6a99c377fd446308ba2b6460469a45464d33557ec56d91 |
|
MD5 | 6f8b4b1006de0f30a35a6e5d2be6f676 |
|
BLAKE2b-256 | 9cc0c1150b8cf555c327a4ad8b4e5eec993038c400237c8a60a17bda1c44bdb1 |
Close
Hashes for cyksuid-2.0.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 491bdabcea59c51bd4447e65161551cdd2ea81b4333c8c0bb44b1c20542b4c17 |
|
MD5 | cead325d05347ac37deb806614846a6f |
|
BLAKE2b-256 | a14cabcf4e8de39db74640c83a2c138fcc9ad74a3391cf1c3abd10a3eec31651 |
Close
Hashes for cyksuid-2.0.0-cp311-cp311-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cad9b5f5e65b53f1e2991495066a542862cba6621c6184a3308a3d94929ad30 |
|
MD5 | 5157facf694a6a062343ce76e25debe0 |
|
BLAKE2b-256 | 3cbd9d44f5dc597f44ea88669c2bcba0b413e572943e56738ee056b8ea15f79e |
Close
Hashes for cyksuid-2.0.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2d7b32e9825fafa290878e1c35596a8f2e1dc0cfad67154d0c778894c90afc3 |
|
MD5 | 42d6aceb157ab423190d09700c0a154a |
|
BLAKE2b-256 | ac7f6877f5eeceea65c68ef415fcdcc2f868ffe5ddacbdfa9cba697e8d2636dd |
Close
Hashes for cyksuid-2.0.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73363b792db282cdfce2e16093d03a8701a1b07ee54b0b33a2a2d548ee2ab6d3 |
|
MD5 | aa03b3d860f1b3f3b97814ea414e96ff |
|
BLAKE2b-256 | 5fd0fdeb8a8c53cbb5fe8d6db4370d84ccff2d43da29f5d2c55a2e7b6d588956 |
Close
Hashes for cyksuid-2.0.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbe0d983b1e31a464e1a089975e55c234f9cafa0889280e4553c09130fd2e498 |
|
MD5 | bd1e00f84523c5ff7d38f33cad3ca2d2 |
|
BLAKE2b-256 | fc42e3b1e783052b601b0ea13082e0d85d34fa816143c888f4442616d5aa9c07 |
Close
Hashes for cyksuid-2.0.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d6463a6a09a64011a87cc85ba94c1730cf6ed8a07a8983f6bad9e816ac91118 |
|
MD5 | 8aa61b89043d09f6eb82e783c7ca5852 |
|
BLAKE2b-256 | 002ad0f871f442c6232338a70c3e06ccc06f26772a7fe24e354f180b11bd9d27 |
Close
Hashes for cyksuid-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 910ed3d560364db9278ac5db5aab2fae61cabbb9a1ad4b1ed2a74a554903fff5 |
|
MD5 | 24aedc1e2a3d078fd0b37968304fc9fc |
|
BLAKE2b-256 | 9b41132115209842dc969e499ec7aad298eacda93e83e26c2b7142204b54497e |
Close
Hashes for cyksuid-2.0.0-cp310-cp310-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3f65efb69eccb0aeffb2c6cd2f739450723ba172904b5103204276f9e212daa |
|
MD5 | 9dbee6b5348d2c55a12286c86d0a94e8 |
|
BLAKE2b-256 | dc49bc17ab6fae0cfc9986e4f52a6b0722f45a99d30e1af0b1eac8a7c7ca8034 |
Close
Hashes for cyksuid-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdebd05343c7db25d914624fcebf058d2eadbfa9017199e6de11b1d528645b8a |
|
MD5 | 692a14dc56abb6f0fbc9d1dca5121353 |
|
BLAKE2b-256 | 8b2d4cad7adf5f3566b34b84bd9f7a65b43b78e9eb7dc563db25acfa5f4ac18c |
Close
Hashes for cyksuid-2.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03afbb496a04a0195d30b634ac5440ee307e3f6663536ec31591d9671515f5cc |
|
MD5 | b5ecf25a16efc89d54ed7637ca87f6ad |
|
BLAKE2b-256 | c96ec5c0beada16647bca8722532fed8f53ac7c6a3b5519e4c96a8847d57adf2 |
Close
Hashes for cyksuid-2.0.0-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a48273d7aad9151e98fcbe44d0919f76a7a55a3813c9b540dab28749ae309fa |
|
MD5 | f6a6f37c081a9926f6b90c24a3e59cb0 |
|
BLAKE2b-256 | f7f3077e881a6e536d1f41621b259880ff7649b7c8c7d0442d30d20bfb0d0278 |
Close
Hashes for cyksuid-2.0.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24b8083a628f7efc8cdbde6dbf3a8c53d374b057805e99d6fab523a989ad4771 |
|
MD5 | 9e170f13e978048e828690402daf87b0 |
|
BLAKE2b-256 | d34f5659474e2f51db0b35cc67e3c7a1376dcdbc3e9b0c58d2f3fac5bf403483 |
Close
Hashes for cyksuid-2.0.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaa8e77651d305bc9382763fb02ed221b90df8a29cccc09397daf15615360409 |
|
MD5 | 4538ba926ed1387adb9525f7055b17a3 |
|
BLAKE2b-256 | 5f2402fe49b18648abc22a3b71823bf5dd8a8e0fb16b5f531e288b35160be241 |
Close
Hashes for cyksuid-2.0.0-cp39-cp39-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f0fc21fe26b70a1327f18beae92a2ea22713e409ceac0c0701d16e5730d1ba4 |
|
MD5 | 6707f5e72c512ddac796facda75b0082 |
|
BLAKE2b-256 | 1aea557268dc2a8ee5d78ab5b5eff0d54353bd9ded1126328c983d9f3f066ff2 |
Close
Hashes for cyksuid-2.0.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 153e3187e9b66307bf765b4ef7c7e0a14144723c00eec1af3ecd5471d6104bf9 |
|
MD5 | 33fe9731897f32a83e00f7c9c2f7306a |
|
BLAKE2b-256 | 837f605507bb8e7d64285fe2e6e9febbed9ea10a2e937f51479c58a9bbfb979e |
Close
Hashes for cyksuid-2.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f2d0079dd279dc3374f3fce7547969168a6df65852d034e3b0b34fdfcadb0b4 |
|
MD5 | 59412d33455491928159a2a93c256af5 |
|
BLAKE2b-256 | 2c6659b6fd8efeef24de8c4e3461d0dccfb295ab93e034a5373ce80cc98ed320 |
Close
Hashes for cyksuid-2.0.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 879afe6e0e3da4a71f74df054fb3d1f48cfc9a6744b18062aee46d2cbc5aebf2 |
|
MD5 | 3d55bc7c5fabd51d22d6c5854f778b25 |
|
BLAKE2b-256 | 7ab68cfe94fbc3a40c1ef67e7da885c3d06e42d267051f8fb3c971c04587b981 |
Close
Hashes for cyksuid-2.0.0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 627018992f78d242b3f45ceaf8e43fd08658b2dc73e0e9a431ea019eef3f947f |
|
MD5 | 69d1c7aec5b0a71f3ef9c09e788a176f |
|
BLAKE2b-256 | e44d27be81abddd66edf328bfa3b438b2c4e5a558f32853715b07f45dbafd458 |
Close
Hashes for cyksuid-2.0.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d70e0292f1290dcd589200d88eef6901e34f74f9133342a97f411646966383b4 |
|
MD5 | 6961f1b3e01d59b9cd365177ea190aba |
|
BLAKE2b-256 | c77a4b8f58a6de0fb827ec13d27257c4f730b16e0ba52e72bc456d69a5d5bf48 |
Close
Hashes for cyksuid-2.0.0-cp38-cp38-macosx_10_15_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec7693c079f0450ef6cee52d41982ad8c760654920fa4e57bf77eb7d453a2daa |
|
MD5 | f3b6c109c3affe65913d323b318156f7 |
|
BLAKE2b-256 | 3a9298cdc823fcea91088f9e100d964edb2044580e0c60860838bc0fb3fbe0e3 |
Close
Hashes for cyksuid-2.0.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6231ad3f847b4fe0b891f78a3dc496fbc9e2f3c96b523ed4f0b111b288036dee |
|
MD5 | 7b0493603c5fffcae1c7759f693433d5 |
|
BLAKE2b-256 | cb5589a16b9e9755a69a434e14657ae9469665c1bcf0aea2fef2df2225e7fcbb |
Close
Hashes for cyksuid-2.0.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e1a0e76f1d198472babb1aa83f27096dffaaad87b616866c7afcca7c89f4f68 |
|
MD5 | 7c276d5da543c18d30015ba12d1eb5d5 |
|
BLAKE2b-256 | 3485464a29eea0a8e04ddf6b3af8b3c7c88ab39527f9c7dcc40a37eab2c47724 |
Close
Hashes for cyksuid-2.0.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6a998c2565240f0cf1db322773fc76f362a754a7a3b9ac102665753981b7a3e |
|
MD5 | 59f11ce0f5099a1009e8a593d5563362 |
|
BLAKE2b-256 | ceea10a11d3df39adff4bdb19434359a5876d0ec75968faf6fbbd37bcd30348a |
Close
Hashes for cyksuid-2.0.0-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeaa331cbd25d3d8a0d33f3c373d3811a85ad069d77492a0cb7ce681d74a181c |
|
MD5 | 163f10d7879cb027c0a4b988ce93386b |
|
BLAKE2b-256 | 9b775c6688806997e38ddab8b8d72b4e43396030abf7d413d2d73e700da996a1 |
Close
Hashes for cyksuid-2.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed7a2c6afc4c25db199855b2508657bb0d81071d5a6c0cadf7f14960d5beeb6e |
|
MD5 | 1e541ac423ecbda6ac6a5fd255f25df5 |
|
BLAKE2b-256 | eaebc4e481ded38959c1ab18c41ec390a65487ec70cf7ef47a3388abf761610d |
Close
Hashes for cyksuid-2.0.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 727db4f545bb5c8c726f8a5419949c13435534d6d18d66d83c8c611356a22c5d |
|
MD5 | 6b2f79c0dba9b08385feee7aa245d84a |
|
BLAKE2b-256 | d041a7232211503cd74bfa9001cd0fae8d8e26f00f8a3733b6b9785317020258 |