{"id":16612374,"url":"https://github.com/timonwong/cyksuid","last_synced_at":"2025-04-05T11:07:10.406Z","repository":{"id":55422706,"uuid":"95294909","full_name":"timonwong/cyksuid","owner":"timonwong","description":"Fast Python implementation of KSUID (K-Sortable Globally Unique IDs) using Cython","archived":false,"fork":false,"pushed_at":"2024-10-07T11:15:16.000Z","size":173,"stargazers_count":51,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-13T01:42:41.527Z","etag":null,"topics":["coordination","ksuid","python","sortable","uuid"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timonwong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-24T11:59:25.000Z","updated_at":"2024-10-08T06:37:12.000Z","dependencies_parsed_at":"2024-06-21T18:55:50.943Z","dependency_job_id":"8aedc58a-ca2b-45f4-8921-e677d69b9835","html_url":"https://github.com/timonwong/cyksuid","commit_stats":{"total_commits":64,"total_committers":3,"mean_commits":"21.333333333333332","dds":0.09375,"last_synced_commit":"624ad6637f08f772b5497d4489f9b1614bba7acc"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonwong%2Fcyksuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonwong%2Fcyksuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonwong%2Fcyksuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timonwong%2Fcyksuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timonwong","download_url":"https://codeload.github.com/timonwong/cyksuid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coordination","ksuid","python","sortable","uuid"],"created_at":"2024-10-12T01:42:05.184Z","updated_at":"2025-04-05T11:07:10.389Z","avatar_url":"https://github.com/timonwong.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CyKSUID\n\nA high performance Cython implementation of\n[KSUID](https://github.com/segmentio/ksuid) (K-Sortable Globally Unique\nIDs).\n\n## Badges\n\n![Build Status](https://github.com/timonwong/cyksuid/workflows/Test/badge.svg)\n[![Coverage](https://img.shields.io/codecov/c/github/timonwong/cyksuid?token=Nutf41gwoG)](https://app.codecov.io/gh/timonwong/cyksuid)\n[![License](https://img.shields.io/github/license/timonwong/cyksuid.svg)](/LICENSE)\n[![Release](https://img.shields.io/github/release/timonwong/cyksuid.svg)](https://github.com/timonwong/cyksuid/releases/latest)\n\n## LICENSE\n\nNew BSD. See [License\nFile](https://github.com/timonwong/cyksuid/blob/master/LICENSE).\n\n## Install\n\n`cyksuid` is on the Python Package Index\n([PyPI](https://pypi.org/project/cyksuid)):\n\n```bash\npip install cyksuid\n```\n\n## Dependencies\n\n`cyksuid` supports Python 3.7+ with a common codebase. It is developed\nin Cython, but requires no dependency other than CPython and a C\ncompiler.\n\n## Sample Usage\n\n### v1 API\n\n```python\nfrom cyksuid import ksuid, parse\n\nuid = ksuid.ksuid()\n\nuid.bytes       # b'\\x0f\\xd4oB\\x81I\\xe5\\x8d\\x95\\xb5\\xeb\\xbc\"\\xa0\\xcd\\xfe)N\\xe0I'\nuid.hex         # '0fd46f428149e58d95b5ebbc22a0cdfe294ee049'\nuid.datetime    # datetime.datetime(2022, 10, 12, 13, 12, 34)\nuid.timestamp   # 1665580354\nuid.encoded     # b'2G2IfS6177qFICE3w10eMjgYu89'\n\nparse(uid.encoded)\n```\n\n### v2 API\n\n```python\nfrom cyksuid.v2 import ksuid, parse\n\nuid = ksuid()\n\nuid.bytes       # b'\\x0f\\xd4oB\\x81I\\xe5\\x8d\\x95\\xb5\\xeb\\xbc\"\\xa0\\xcd\\xfe)N\\xe0I'\nuid.hex         # '0fd46f428149e58d95b5ebbc22a0cdfe294ee049'\nuid.datetime    # datetime.datetime(2022, 10, 12, 13, 12, 34, tzinfo=datetime.timezone.utc)\nuid.timestamp   # 1665580354.0\nuid.encoded     # b'2G2IfS6177qFICE3w10eMjgYu89'\nstr(uid)        # '2G2IfS6177qFICE3w10eMjgYu89'\n\nparse(uid.encoded)\n```\n\n## Benchmark\n\n```\nplatform darwin -- Python 3.11.0, pytest-7.1.3, pluggy-1.0.0\nbenchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)\n\n-------------------------------------------------------------------------------------- benchmark 'test_generate': 2 tests -------------------------------------------------------------------------------------\nName (time in ns)                 Min                    Max                  Mean              StdDev                Median                IQR            Outliers  OPS (Kops/s)            Rounds  Iterations\n---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ntest_generate[cyksuid]       292.0278 (1.0)      15,249.9997 (1.0)        438.1552 (1.0)      107.5430 (1.0)        416.9997 (1.0)       0.9895 (1.0)    10589;47969    2,282.2965 (1.0)      137137           1\ntest_generate[svix]        1,374.9814 (4.71)     27,458.9984 (1.80)     1,504.6515 (3.43)     454.7297 (4.23)     1,458.9750 (3.50)     42.0259 (42.47)     58;1549      664.6057 (0.29)      16316           1\n---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n--------------------------------------------------------------------------------------- benchmark 'test_parse': 2 tests ----------------------------------------------------------------------------------------\nName (time in ns)               Min                    Max                   Mean              StdDev                 Median                 IQR            Outliers  OPS (Kops/s)            Rounds  Iterations\n----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ntest_parse[cyksuid]        198.3182 (1.0)       1,666.6809 (1.0)         205.4135 (1.0)       14.4218 (1.0)         204.9981 (1.0)        3.3225 (1.0)     1036;5733    4,868.2302 (1.0)      193537          25\ntest_parse[svix]        10,750.0236 (54.21)    40,624.9892 (24.37)    11,126.0083 (54.16)    624.4237 (43.30)    11,041.9933 (53.86)    124.9718 (37.61)    580;2705       89.8795 (0.02)      30731           1\n----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\nLegend:\n  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.\n  OPS: Operations Per Second, computed as 1 / Mean\n============================================================================================ 4 passed in 3.27s =============================================================================================\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimonwong%2Fcyksuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimonwong%2Fcyksuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimonwong%2Fcyksuid/lists"}