Skip to main content
Software test outcome Software tests code coverage Supported versions of Python PyPI Status Version on PyPI https://pepy.tech/badge/vasuki/month License

https://ptrace.hiveeyes.org/2019-06-29_vasuki-small.jpg

Vasuki

About

Vasuki generates different kinds of random unique identifiers, tokens, and words.

It can be used as a library and as an HTTP service, aiming to provide effortless identifier generation for your applications.

A public instance of the HTTP service is available at https://api.hiveeyes.org/vasuki/.

Synopsis

# UUIDv4 universally unique identifier.
vasuki uuid

# ULID universally unique lexicographically sortable identifier.
vasuki ulid

# Gibberish random, pronounceable pseudo-words
vasuki gibberish

# MomentName short epoch slugs
vasuki moment

# Nagamani19 short, unique, non-sequential identifier.
vasuki naga19

Install

Prerequisites

pip install vasuki

With service API:

pip install 'vasuki[service]'

Please note this software is a work in progress, and its interfaces may change. For those reasons, if you use it as a dependency in your own programs, version pinning is always recommended.

Features

Unique ID generators

  • UUIDv4 universally unique identifier

  • ULID universally unique lexicographically sortable identifier

  • Gibberish random, pronounceable pseudo-words

  • MomentName, a short epoch slug

  • Nagamani19, a short, unique, non-sequential identifier based on Hashids and a custom Epoch starting on January 1, 2019.

Time and randomness is usually taking from the system as implemented by the libraries underpinning this package.

Slugifiers

  • six-nibble-name converts six nibbles (three bytes) into a 4-character name

Optional service API

The fine responder library optionally exposes the machinery as HTTP API.

Examples

Identifier generation

# UUIDv4
vasuki uuid
d192b464-d32c-48f1-9c23-0fe04a4e8133

# ULID
vasuki ulid
01DEFKXYCJ0E91DQY0YPWZY01D

# Gibberish
vasuki gibberish
shoomly

# MomentName
vasuki moment
Zese

# Nagamani19
vasuki naga19
Xm3k6mWq

With transformations

Vasuki can apply uppercase or lowercase transformation to the generated identifier or word:

# UUIDv4, uppercase
vasuki uuid --upper
43FA0272-CA48-40AE-8CC1-204302D91D89

# ULID, lowercase
vasuki ulid --lower
01defkz01k47dqkvcyhy0mz06e

With variable word length

vasuki gibberish --size medium
schreblyiopp

Slug tools

vasuki slug 42 --format=sixnibble
Baca

Multiple tokens at once

vasuki naga19 --count 10
vasuki gibberish --size large --count 50

HTTP API

Start the Vasuki service as daemon:

vasuki service

Example requests would look like:

# UUIDv4
/unique/uuid

# Uppercase UUIDv4
/unique/uuid?upper=true

# Multiple ULIDs
/unique/ulid?count=10

# Very short Nagamani19
/unique/naga19?size=small

Development

Acquire sources:

git clone https://github.com/daq-tools/vasuki
cd vasuki

Install development sandbox:

python3 -m venv .venv
source .venv/bin/activate
pip install --editable='.[service,develop,docs,test]'
vasuki --version

Run linter and software tests:

poe check

Disclaimer

The algorithms and procedures curated here generate different kinds of random and pseudo-random identifiers, tokens, names or passwords.

While some generated tokens max out on the randomness and uniqueness aspects like UUIDs, others compromise on the time vs. space domain but focus more on human memorability and empathize with their common sense and humor.

Saying that, it is important to understand their properties and features when using those identifiers in different contexts. YMMV.

For more in-depth information, enjoy reading Understanding UUIDs, ULIDs and String Representations and its corresponding discussion.

Warranty and License

Please refer to the LICENSE file for further information and caveats about warranty and licensing information.

You are responsible for using this software responsibly, it comes without warranty of any kind.

Credits

Etymology

Kurma is one of the avatars of Vishnu. He appears in the form of a tortoise or turtle to support the foundation of the cosmos, while the gods and demons churn the cosmic ocean with the help of serpent Vasuki to produce the nectar of immortality.

Vasuki is a naga serpent king, occasionally coiling around Kurma’s or Shiva’s neck, who blessed and wore him as an ornament. He is described as having a gem called Nagamani on his head.

Release files for vasuki 0.7.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vasuki 0.7.3
File Size Uploaded
vasuki-0.7.3.tar.gz 23.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vasuki 0.7.3
File Interpreter ABI Platform
vasuki-0.7.3-py3-none-any.whl Python 3 none any Details

Total release size: 45.1 kB

Release files / vasuki-0.7.3.tar.gz

Download URL vasuki-0.7.3.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e9c36c19c6efa6dc5615e13de2a4a4aea000925a06953c5c2889344cdefea1bd
BLAKE2b-256 checksum
How to use checksums
3f46dfde64cefc8931cc857fbcf0679ecaebb9f495675dea802fec5e298c6dcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / vasuki-0.7.3-py3-none-any.whl

Download URL vasuki-0.7.3-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92e5d5419b6f8655ce0ae27de68a1e534b4bd8c2eaa6ebb1d919f4688419ac68
BLAKE2b-256 checksum
How to use checksums
e59a21a2518d36d9deb9a5dac95b0d47b6aa58d0888839423d56aea0d2e9dd83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.7.3 This release

2 release files

0.7.2

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page