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

Uploaded source

Built Distribution

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

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page