UUID with built-in creation date
Project description
UniversalID
Generates unique id's based on the current date/time
Features
- Unid includes a datetime stamp - your can extract the creation time from a Unid
- You can assign a custom prefix to your id, e.g. a country code
- Unid is case-insentitive
- Base 36 encoded (digits + letters from A-Z)
- Uses the secrets library to generate cryptographically strong pseudo-random numbers
- Fully documented: https://universalid.readthedocs.io/en/latest/
- 100% coverage
Installation
Install the latest release from PyPI <https://pypi.org/project/universalid/>_:
.. code-block:: sh
pip install universalid
Usage
The Unid class is available directly off the :code:universalid package::
>>> from universalid import Unid
>>> Unid.create(prefix='DK')
'DKDQ2D6JCJXI2Q82J06X0PK16P34XDO0'
>>> unid = Unid.create()
>>> Unid.get_time( unid )
datetime.datetime(2018, 12, 20, 11, 36, 27, 756356)
Links
Useful links
- Nano Id collision
calculator <https://zelark.github.io/nano-id-cc/>_ Universal ID <https://www-01.ibm.com/support/docview.wss?uid=swg21112556>_ in Lotus Notes
Contribute
- Issue Tracker: github.com/$project/$project/issues
- Source Code: https://github.com/majkilde/universalid.git
License
The project is licensed under the MIT license.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file universalid-1.0.0.tar.gz.
File metadata
- Download URL: universalid-1.0.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
629a80e1dbc54c043255a8a96451cf99296a2d8fcd3977f876ff1fe5e2c296d9
|
|
| MD5 |
ed40751e37822f0288ce6a3f77ae2ff0
|
|
| BLAKE2b-256 |
3154eed46ac0bf25585f19d72f3590019a31a7ae967c659ecc74530e73e6b200
|
File details
Details for the file universalid-1.0.0-py3-none-any.whl.
File metadata
- Download URL: universalid-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
484649af1aa8fd98bf7388ebe5793b84040197d33c438fb2659d76b9a0f597d5
|
|
| MD5 |
86292ec3c24843b1b76ce54f350964f3
|
|
| BLAKE2b-256 |
cacec2e743befd7984abbcf13731c354d796bc54abb2d4e09520fc6e0c9c3b07
|