Skip to main content

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:

Release files for hisak-idtools 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hisak-idtools 0.2.0
File Size Uploaded
hisak_idtools-0.2.0.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hisak-idtools 0.2.0
File Interpreter ABI Platform
hisak_idtools-0.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 14.0 kB

Release files / hisak_idtools-0.2.0.tar.gz

Download URL hisak_idtools-0.2.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
820159c4305184329cbe537d1dfee0ce9ca379fd1ba2d0e8d9dc3c2338f7ad3c
BLAKE2b-256 checksum
How to use checksums
3dbf1c9b8342296c651d6a35e8a68aeda5eb2c58e1f9f0b2f4a15b86243bc223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.13.1

Release files / hisak_idtools-0.2.0-py2.py3-none-any.whl

Download URL hisak_idtools-0.2.0-py2.py3-none-any.whl
Size 7.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
dd879988f96a18c9794c3d0931ebe05f6cafcb53b0dc7562125721e55d29090c
BLAKE2b-256 checksum
How to use checksums
032d7b5328e4b40a17a8b02fd9019525a1a0a4c0597062344e09502090375e6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page