Skip to main content

Alphabets and string functions designed to be used with Nano ID.

Installation

pip install nanoid-dictionary

Usage

Available alphabets and functions:

  • alphabet_std

  • human_alphabet

  • lookalikes

  • lowercase

  • numbers

  • prevent_misreadings(unsafe_chars, alphabet)

  • uppercase

prevent_misreadings(unsafe_chars, alphabet) accepts a string and removes all the characters that look similar by default. The function is also case-insensitive.

from nanoid_dictionary import *

alphabet_std   # => _-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
human_alphabet # => _-23456789abcdefghijkmnpqrstuvwxyzABCDEFGHIJKMNPQRSTUVWXYZ

lookalikes                               # => 1l0o
lowercase                                # => abcdefghijklmnopqrstuvwxyz
numbers                                  # => 0123456789
prevent_misreadings(lookalikes, 'a1l0o') # => a
uppercase                                # => ABCDEFGHIJKLMNOPQRSTUVWXYZ

Thanks to

Metadata

Release files for nanoid-dictionary 2.4.0

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

Source distribution (sdist)

Source distribution for nanoid-dictionary 2.4.0
File Size Uploaded
nanoid-dictionary-2.4.0.tar.gz 2.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nanoid-dictionary 2.4.0
File Interpreter ABI Platform
nanoid_dictionary-2.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 kB

Release files / nanoid-dictionary-2.4.0.tar.gz

Download URL nanoid-dictionary-2.4.0.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9bf3030de971e5c30cabc4684d81ed7c4c17acfd730324d795bca9b29b8a8f04
BLAKE2b-256 checksum
How to use checksums
8659a6f6c9ee4aaf3c07d9f648093e6a298dda34f598370240e9adb47db4607b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / nanoid_dictionary-2.4.0-py3-none-any.whl

Download URL nanoid_dictionary-2.4.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca493cfdb9832c98554459e2a765510cc0f2f83d8abd366a9bdad1cf44492db1
BLAKE2b-256 checksum
How to use checksums
85fc810e15be37c4bf383eb33bec12b35bcc08be518e6420e45d8b26b907f396
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

2.4.0 This release

2 release files

2.1.0

2 release files

2.0.0

2 release files

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