Skip to main content

Python library for generating NanoIDs

Project description

nanoid

Simple Python library for generating NanoIDs

Documentation
PyPI

Installation

pip install kabbes_nanoid

Usage

For more in-depth documentation, read the information provided on the Pages. Or better yet, read the source code.

Importing

import nanoid

Get a nanoid string

nanoid_string = nanoid.generate()
print (nanoid_string)

Generate a Nanoid object

Obj = nanoid.Nanoid()
print (Obj.nanoid)
print (Obj.size)
print (Obj.alphabet)

Set custom generation parameters

print (nanoid.generate( size = 10, alphabet = '0123456789ABCDEF' ))
Obj = nanoid.Nanoid( size = 10, alphabet = '0123456789ABCDEF' )
print (Obj.nanoid)

Author

James Kabbes

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

kabbes_nanoid-0.7.0.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

kabbes_nanoid-0.7.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

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