Skip to main content

Predefined character sets to use with Nano ID

Project description

Nano ID dictionary

Predefined character sets to use with Nano ID.


Install Nano ID dictionary using pip:

pip install nanoid-dictionary


Nano ID dictionary has alphabet_std and human_alphabet alphabets.

The dictionary also provides many useful sets of strings and functions to use:

  • lookalikes;
  • lowercase;
  • numbers;
  • uppercase;
  • prevent_misreadings(unsafe_chars, string).

prevent_misreadings(unsafe_chars, string) accepts a string and removes all the characters that look similar. You can pass your own optional character set if you want.

from nanoid_dictionary import *

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

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

Thanks to

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
nanoid_dictionary-2.1.0-py3-none-any.whl (2.6 kB) Copy SHA256 hash SHA256 Wheel py3
nanoid-dictionary-2.1.0.tar.gz (2.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page