Skip to main content

youtube-like UUIDs

Project description

yuid

Introduction

This is a simple script that generates a 64bit UUID and encodes it in base62 thus generating a secure unique 11 char string that are similar to the beloved youtube video ids

Structure

Our 64 bit string is composed with the following method

10 bits are random 12 bits are a hash from machine id 42 bits are unixtime till milliseconds

they are all concatenated in the mentioned order

Install

pip install yuid

Usage

>>> from yuid import yuid
>>> yuid()
UAfxKExKjVQ

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

yuid-0.1.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

yuid-0.1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file yuid-0.1.0.tar.gz.

File metadata

  • Download URL: yuid-0.1.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for yuid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d0a5544123355d0829fa2b8fef8407eb2ad10de9a0bb18adbaa90b646dbaa326
MD5 feea80a9441ebd211b451b840b922c24
BLAKE2b-256 e371083d8c58d11d809cdad27f852584a32c05faf236c3007dce41f477dd903e

See more details on using hashes here.

File details

Details for the file yuid-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: yuid-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for yuid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 933c076fcd8918a88eb1a656155478634f191735880d3e83d862d91f1969a246
MD5 01446e7f38d392db26f3b3bd6be5e65b
BLAKE2b-256 4fd6cd30e3ca78145d3a1c67ec80929fa10939042f271f75cd0ed9746a1756c9

See more details on using hashes here.

Supported by

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