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
Usage¶
The Unid class is available directly off the 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)
Contribute¶
- Issue Tracker: github.com/$project/$project/issues
- Source Code: https://github.com/majkilde/universalid.git