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.1.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: yuid-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 43f942173a3af06c807157e169d882ab0fd4bc39d228968a91797dc85c6e69ca
MD5 471104b58de8e1bb5c389c88e193a26b
BLAKE2b-256 a6121388732beedc2c79512081ebc768b5be4651e07139562aa2ffd0e21b9b39

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yuid-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e2fbaaa6967780cfcc9c29cbf3dcf76dd82a12a27149d3fcca476cad58d4b20f
MD5 e35593132cd7b9f13249489105227120
BLAKE2b-256 c6100bea86b0730185a88e28971a13b6f23a99f9119a8862edbbc3bf4cfd750a

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