Metadata-Version: 2.1
Name: hisak-idtools
Version: 0.2.0
Summary: Identifier generator tools often used privately
Home-page: https://gitlab.com/HiSakDev/idtools
Author: HiSakDev
Author-email: sak.devac@gmail.com
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*
Description-Content-Type: text/markdown
License-File: LICENSE

# 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:
```shell
pip install -U hisak-idtools
```


## Xid Example

```python
from hisak.idtools.xid import new_xid

print(new_xid())
```


## UUID7 Example

```python
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

```python
from hisak.idtools.uuid58 import uuid4

print(uuid4().base58)
```


## Links

I used the following code as reference:
- https://github.com/rs/xid
- https://github.com/graham/python_xid
- https://github.com/keis/base58
- https://github.com/google/uuid
