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
Andrey Sitnik for Nano ID.
Aleksandr Zhuravlev for incredible Nano ID calculator.
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)
| File | Size | Uploaded | |
|---|---|---|---|
| nanoid-dictionary-2.4.0.tar.gz | 2.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|