EightID: A (really) short id, that fits in 8 bytes.
EightID is a short ID that fits in 8 bytes. 4 bytes are dedicated to the timestamp (second resolution) and the other are 4 random bytes.
It's only 8 bytes and as such it fits in a BigInt column.
Installation
Installation using pip:
pip install eightid
Quick intro
>>> from eightid import EightID
>>> short_id = EightID()
# Displays as base64 by default
>>> short_id
<EightID 'AH4jTMKtwrXCr8OQ'>
>>> print(short_id)
AH4jTMKtwrXCr8OQ
>>> short_id.integer
35504659304394704
# Access when the id was created
>>> short_id.datetime
datetime.datetime(2022, 4, 6, 17, 16, 12)
# Access with str() and .string
>>> str(short_id)
'AH4jTMKtwrXCr8OQ'
>>> short_id.string
'AH4jTMKtwrXCr8OQ'
# Recreate the EightID from a string
>>> EightID.from_string(short_id.string)
<EightID 'AH4jTMKtwrXCr8OQ'>
# Or from
>>> EightID.from_int(short_id.integer)
<EightID 'AH4jTMKtwrXCr8OQ'>
Django integration
from eightid import django
class AppModel(models.Model):
id = django.EightIDField(primary_key=True)
License
EightID is licensed under the MIT license (see the LICENSE file for details).
Metadata
Release files for eightid 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eightid-0.1.1.tar.gz | 4.5 kB | Without provenance | Details for eightid-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eightid-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for eightid-0.1.1-py3-none-any.whl |
Total release size: 9.6 kB
Release files / eightid-0.1.1.tar.gz
| Download URL | eightid-0.1.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b193b0c2269f7bac3b83d4553e784f6acba2e37fc1adf30e5702d6ac7469618
|
|
BLAKE2b-256 checksum How to use checksums |
8eeee3310304d63df83f49c7027f66821d1fc26e5f98ba98d9e66a3ef0b74431
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.12 Linux/5.13.0-1017-azure
|
Release files / eightid-0.1.1-py3-none-any.whl
| Download URL | eightid-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa349f8f25c26e5950321c53560dc24aa1082dcb134c42f73a0a240169475ff4
|
|
BLAKE2b-256 checksum How to use checksums |
5778abe490c37225efc0c41f3d9fc23da2cb0ab7e5a822817581b81ef2893c43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.12 Linux/5.13.0-1017-azure
|
Security for eightid 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.