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 Python 3

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