Name | scru64 JSON |
Version |
1.0.2
JSON |
| download |
home_page | https://github.com/scru64/python |
Summary | SCRU64: Sortable, Clock-based, Realm-specifically Unique identifier |
upload_time | 2025-01-12 16:39:55 |
maintainer | None |
docs_url | None |
author | LiosK |
requires_python | >=3.9 |
license | Apache-2.0 |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# SCRU64: Sortable, Clock-based, Realm-specifically Unique identifier
[](https://pypi.org/project/scru64/)
[](https://github.com/scru64/python/blob/main/LICENSE)
SCRU64 ID offers compact, time-ordered unique identifiers generated by
distributed nodes. SCRU64 has the following features:
- 63-bit non-negative integer storable as signed/unsigned 64-bit integer
- Sortable by generation time (as integer and as text)
- 12-digit case-insensitive textual representation (Base36)
- ~38-bit Unix epoch-based timestamp that ensures useful life until year 4261
- Variable-length node/machine ID and counter fields that share 24 bits
```python
# pass node ID through environment variable
import os
os.environ["SCRU64_NODE_SPEC"] = "42/8"
import scru64
# generate a new identifier object
x = scru64.new_sync()
print(x) # e.g., "0u2r85hm2pt3"
print(int(x)) # as a 64-bit unsigned integer
# generate a textual representation directly
print(scru64.new_string_sync()) # e.g., "0u2r85hm2pt4"
```
See [SCRU64 Specification] for details.
SCRU64's uniqueness is realm-specific, i.e., dependent on the centralized
assignment of node ID to each generator. If you need decentralized, globally
unique time-ordered identifiers, consider [SCRU128].
[SCRU64 Specification]: https://github.com/scru64/spec
[SCRU128]: https://github.com/scru128/spec
## License
Licensed under the Apache License, Version 2.0.
Raw data
{
"_id": null,
"home_page": "https://github.com/scru64/python",
"name": "scru64",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "LiosK",
"author_email": "contact@mail.liosk.net",
"download_url": "https://files.pythonhosted.org/packages/5e/e9/da8cf5347b6256974f454f365d04f099d89e80184a479fb8122cc12e4e4b/scru64-1.0.2.tar.gz",
"platform": null,
"description": "# SCRU64: Sortable, Clock-based, Realm-specifically Unique identifier\n\n[](https://pypi.org/project/scru64/)\n[](https://github.com/scru64/python/blob/main/LICENSE)\n\nSCRU64 ID offers compact, time-ordered unique identifiers generated by\ndistributed nodes. SCRU64 has the following features:\n\n- 63-bit non-negative integer storable as signed/unsigned 64-bit integer\n- Sortable by generation time (as integer and as text)\n- 12-digit case-insensitive textual representation (Base36)\n- ~38-bit Unix epoch-based timestamp that ensures useful life until year 4261\n- Variable-length node/machine ID and counter fields that share 24 bits\n\n```python\n# pass node ID through environment variable\nimport os\n\nos.environ[\"SCRU64_NODE_SPEC\"] = \"42/8\"\n\nimport scru64\n\n# generate a new identifier object\nx = scru64.new_sync()\nprint(x) # e.g., \"0u2r85hm2pt3\"\nprint(int(x)) # as a 64-bit unsigned integer\n\n\n# generate a textual representation directly\nprint(scru64.new_string_sync()) # e.g., \"0u2r85hm2pt4\"\n```\n\nSee [SCRU64 Specification] for details.\n\nSCRU64's uniqueness is realm-specific, i.e., dependent on the centralized\nassignment of node ID to each generator. If you need decentralized, globally\nunique time-ordered identifiers, consider [SCRU128].\n\n[SCRU64 Specification]: https://github.com/scru64/spec\n[SCRU128]: https://github.com/scru128/spec\n\n## License\n\nLicensed under the Apache License, Version 2.0.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "SCRU64: Sortable, Clock-based, Realm-specifically Unique identifier",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/scru64/python"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "60b272b885c1cc3b1740a0410b97def2538e15dc1788b92f91952df1c2d70b95",
"md5": "334da53da28129d8487ed1f8221a6801",
"sha256": "8d8fb7dbecd1e461a42af561ea28b50037b4a4f25b6470c3c2d5487751a1359c"
},
"downloads": -1,
"filename": "scru64-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "334da53da28129d8487ed1f8221a6801",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 12346,
"upload_time": "2025-01-12T16:39:52",
"upload_time_iso_8601": "2025-01-12T16:39:52.789711Z",
"url": "https://files.pythonhosted.org/packages/60/b2/72b885c1cc3b1740a0410b97def2538e15dc1788b92f91952df1c2d70b95/scru64-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5ee9da8cf5347b6256974f454f365d04f099d89e80184a479fb8122cc12e4e4b",
"md5": "6cbd29c1ed5f86129294c45a19234bd1",
"sha256": "9b5ff1d2b732c465f081778095ffe9a4f536ba7373ea8ae18f1583450bf5648d"
},
"downloads": -1,
"filename": "scru64-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "6cbd29c1ed5f86129294c45a19234bd1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 11549,
"upload_time": "2025-01-12T16:39:55",
"upload_time_iso_8601": "2025-01-12T16:39:55.228977Z",
"url": "https://files.pythonhosted.org/packages/5e/e9/da8cf5347b6256974f454f365d04f099d89e80184a479fb8122cc12e4e4b/scru64-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-12 16:39:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "scru64",
"github_project": "python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "scru64"
}