Skip to main content

Library to shorten UUIDs

Project description

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')

Credits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kuid-0.1.2.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

kuid-0.1.2-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file kuid-0.1.2.tar.gz.

File metadata

  • Download URL: kuid-0.1.2.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for kuid-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0c077075a9efb1a7eac3979957fe5e4f391729747af18d52bd7f7ba14d3e37f6
MD5 a0b262c6a463daafab88dc1509900909
BLAKE2b-256 b98b891d6a133595265f90088934e416f283cb066fd1a54f1195715d1603e33f

See more details on using hashes here.

File details

Details for the file kuid-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: kuid-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for kuid-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d6b133b1ece10f6abdc937a4e2c8554156002a70f8903eb12ae8f1a6f03a4bb8
MD5 deef761114dd57eac9882b26065204ce
BLAKE2b-256 4c7a895457c85e5801426e8f793e27bb357beed44668612b9722688b7fbbc9d8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page