Generate Nano ID using Python

nanoid package

  1. Install nanoid package from the command line:
pip install nanoid
  1. Generate Nano ID:
import nanoid

nanoIdStr = nanoid.generate()
print(nanoIdStr)

nanoIdStr = nanoid.generate('0123456789abc', 10)
print(nanoIdStr)

Leave a Comment

Cancel reply

Your email address will not be published.