Identifier generator tools often used privately
Project description
Python Identifier Generator Tools
Identifier generator tools often used privately in Python.
Includes the following features:
- base32
- support alphabet RFC4648, base32hex, crockford, zbase32
- base58
- support alphabet bitcoin, ripple, flickr
- base58check encoding
- xid
- python implementation of xid
- uuid7
- python implementation of uuid version 7
- leftmost random bits (12 bits) use nanoseconds
- uuid58
- convert uuid to base58, base58 to uuid
- convert uuid to base58check, base58check to uuid
Install
Install and update using pip:
pip install -U hisak-idtools
Xid Example
from hisak.idtools.xid import new_xid
print(new_xid())
UUID7 Example
from hisak.idtools.uuid7 import new_uuid7
print(new_uuid7())
If you use it in multithreading or multiprocessing, the counter is not exclusive, so if you want to guarantee monotonicity counter in nanoseconds, you must implement exclusion separately.
UUID58 Example
from hisak.idtools.uuid58 import uuid4
print(uuid4().base58)
Links
I used the following code as reference:
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 hisak_idtools-0.2.0.tar.gz.
File metadata
- Download URL: hisak_idtools-0.2.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
820159c4305184329cbe537d1dfee0ce9ca379fd1ba2d0e8d9dc3c2338f7ad3c
|
|
| MD5 |
5b5c767d97dbf1dbe9ada60663bf4db3
|
|
| BLAKE2b-256 |
3dbf1c9b8342296c651d6a35e8a68aeda5eb2c58e1f9f0b2f4a15b86243bc223
|
File details
Details for the file hisak_idtools-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: hisak_idtools-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd879988f96a18c9794c3d0931ebe05f6cafcb53b0dc7562125721e55d29090c
|
|
| MD5 |
567218ec00f6df65abac34ca8fa11d42
|
|
| BLAKE2b-256 |
032d7b5328e4b40a17a8b02fd9019525a1a0a4c0597062344e09502090375e6a
|