ai-station/.venv/lib/python3.12/site-packages/cuid-0.4.dist-info/METADATA

62 lines
2.3 KiB
Plaintext

Metadata-Version: 2.4
Name: cuid
Version: 0.4
Summary: Fast, scalable unique ID generation
Home-page: http://github.com/necaris/cuid.py
Download-URL: http://github.com/necaris/cuid.py/tarball/v0.4
Author: Rami Chowdhury
Author-email: rami.chowdhury@gmail.com
Maintainer: Rami Chowdhury
Maintainer-email: rami.chowdhury@gmail.com
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: summary
# 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.