Skip to main content

kuid

A universally unique identifier, is essentially a shorter version of a UUID and is commonly used to identify records in various applications.

Rationale

When writing a web application, often times we would like to keep the URLs short.

http://localhost/posts/5eAU5M3OyqyuX93bJHopJV

This certainly gives a more concise look than the following.

http://localhost/posts/b9926647-86a7-4f31-9c38-f7cf711bf865

Installation

kuid can be installed via pypi.

pip install kuid

Usuage

The following section describes a basic usage of base62.

>>> import uuid
>>> import kuid
>>> 
>>> kuid.encode(uuid.UUID('b9926647-86a7-4f31-9c38-f7cf711bf865'))
'5eAU5M3OyqyuX93bJHopJV'
>>> 
>>> kuid.decode('5eAU5M3OyqyuX93bJHopJV')
UUID('b9926647-86a7-4f31-9c38-f7cf711bf865')

It also has wrappers around basic uuid functions

>>> import kuid
>>> 
>>> kuid.kuid1()
'47ZU06aw8pUWT5BzmVHsST'
>>> kuid.kuid4()
'60fq4TTss8KYXlT2yJy3AQ'

Credits

Metadata

Release files for kuid 0.2.1

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

Source distribution (sdist)

Source distribution for kuid 0.2.1
File Size Uploaded
kuid-0.2.1.tar.gz 2.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kuid 0.2.1
File Interpreter ABI Platform
kuid-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.7 kB

Release files / kuid-0.2.1.tar.gz

Download URL kuid-0.2.1.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a50c558072edebfcd6a631feaa8c1c2b4ba9807efd72e80ce34485de4509761a
BLAKE2b-256 checksum
How to use checksums
fda0f915075950b0f834b196b641362571687e890cfa263d4415f3ebe3f6d992
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / kuid-0.2.1-py3-none-any.whl

Download URL kuid-0.2.1-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91b08e7d6ff685775659fa66a634a670f5a5e9dd686eaa54cd27c0deaae8088a
BLAKE2b-256 checksum
How to use checksums
8d715bbe6dfa2e23a0e4eb76cccdcb4b0d0dee14185e2c8d7772e56eddc23491
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.2

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