Skip to main content

Predefined character sets to be used with Nano ID

Project description

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

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

nanoid-dictionary-2.4.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanoid_dictionary-2.4.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file nanoid-dictionary-2.4.0.tar.gz.

File metadata

  • Download URL: nanoid-dictionary-2.4.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for nanoid-dictionary-2.4.0.tar.gz
Algorithm Hash digest
SHA256 9bf3030de971e5c30cabc4684d81ed7c4c17acfd730324d795bca9b29b8a8f04
MD5 9ba2fa4746964314d6819fbe066c6b30
BLAKE2b-256 8659a6f6c9ee4aaf3c07d9f648093e6a298dda34f598370240e9adb47db4607b

See more details on using hashes here.

File details

Details for the file nanoid_dictionary-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: nanoid_dictionary-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for nanoid_dictionary-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca493cfdb9832c98554459e2a765510cc0f2f83d8abd366a9bdad1cf44492db1
MD5 108dcaef114fc23426bcaca1163139d4
BLAKE2b-256 85fc810e15be37c4bf383eb33bec12b35bcc08be518e6420e45d8b26b907f396

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page