cuid


Namecuid JSON
Version 0.4 PyPI version JSON
download
home_pagehttp://github.com/necaris/cuid.py
SummaryFast, scalable unique ID generation
upload_time2023-03-06 00:41:12
maintainerRami Chowdhury
docs_urlNone
authorRami Chowdhury
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cuid.py 

Implementation of https://github.com/ericelliott/cuid in Python.

A `cuid` is a portable and sequentially-ordered unique identifier designed for
horizontal scalability and speed -- this version is ported from the reference
implementation in Javascript.

**NOTE**: Particularly if you have security concerns, the [`cuid` standard has been deprecated in favor of `cuid2`](https://github.com/paralleldrive/cuid2)!

Tested on CPython 2.7, 3.6-3.11 as well as PyPy & PyPy3.

Rough benchmarks on my machine (i7-8750H CPU @ 2.20GHz) using `setup.py bench`
(which times the creation of 1 million `cuid`s):

| Version                    | ns / cuid |
| -------------------------- | --------- |
| CPython 3.7.3              | 6095.257  |
| CPython 3.6.8              | 6846.050  |
| CPython 3.5.6              | 6604.012  |
| CPython 2.7.16             | 6913.681  |
| PyPy 7.1.1 (Python 2.7.13) | 326.344   |
| PyPy3 7.1.1 (Python 3.6.1) | 562.673   |

_(Note that timing the creation of fewer IDs changes the way PyPy runs the code, because of JIT warmup --
obviously creating this many IDs takes advantage of the warmed JIT)_

For now, this has no dependencies outside the standard library -- in time this may change, 
to provide better random numbers and / or performance.

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/necaris/cuid.py",
    "name": "cuid",
    "maintainer": "Rami Chowdhury",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "rami.chowdhury@gmail.com",
    "keywords": "",
    "author": "Rami Chowdhury",
    "author_email": "rami.chowdhury@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/55/ca/d323556e2bf9bfb63219fbb849ce61bb830cc42d1b25b91cde3815451b91/cuid-0.4.tar.gz",
    "platform": null,
    "description": "# cuid.py \n\nImplementation of https://github.com/ericelliott/cuid in Python.\n\nA `cuid` is a portable and sequentially-ordered unique identifier designed for\nhorizontal scalability and speed -- this version is ported from the reference\nimplementation in Javascript.\n\n**NOTE**: Particularly if you have security concerns, the [`cuid` standard has been deprecated in favor of `cuid2`](https://github.com/paralleldrive/cuid2)!\n\nTested on CPython 2.7, 3.6-3.11 as well as PyPy & PyPy3.\n\nRough benchmarks on my machine (i7-8750H CPU @ 2.20GHz) using `setup.py bench`\n(which times the creation of 1 million `cuid`s):\n\n| Version                    | ns / cuid |\n| -------------------------- | --------- |\n| CPython 3.7.3              | 6095.257  |\n| CPython 3.6.8              | 6846.050  |\n| CPython 3.5.6              | 6604.012  |\n| CPython 2.7.16             | 6913.681  |\n| PyPy 7.1.1 (Python 2.7.13) | 326.344   |\n| PyPy3 7.1.1 (Python 3.6.1) | 562.673   |\n\n_(Note that timing the creation of fewer IDs changes the way PyPy runs the code, because of JIT warmup --\nobviously creating this many IDs takes advantage of the warmed JIT)_\n\nFor now, this has no dependencies outside the standard library -- in time this may change, \nto provide better random numbers and / or performance.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Fast, scalable unique ID generation",
    "version": "0.4",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "55cad323556e2bf9bfb63219fbb849ce61bb830cc42d1b25b91cde3815451b91",
                "md5": "ec69f53df5fc71ee685e9f90c8bf6a5c",
                "sha256": "74eaba154916a2240405c3631acee708c263ef8fa05a86820b87d0f59f84e978"
            },
            "downloads": -1,
            "filename": "cuid-0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "ec69f53df5fc71ee685e9f90c8bf6a5c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4986,
            "upload_time": "2023-03-06T00:41:12",
            "upload_time_iso_8601": "2023-03-06T00:41:12.708166Z",
            "url": "https://files.pythonhosted.org/packages/55/ca/d323556e2bf9bfb63219fbb849ce61bb830cc42d1b25b91cde3815451b91/cuid-0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-06 00:41:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "necaris",
    "github_project": "cuid.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cuid"
}
        
Elapsed time: 0.05644s