Skip to main content

Converts an integer to a hexdigest like string - except not 16 length but provided alphabet length

Project description

Latest Version

num_shorty converts an integer to a hexdigest like string - except not 16 length but provided alphabet length

Example:

>>> from import num_shorty
>>> num_shorty.short(123456789)
'8m0Kx'
>>> num_shorty.expand('8m0Kx')
123456789

You can implement your own alphabet set

>>> from import num_shorty
>>> num_shorty.short(123456789, alphabet='abcdefgABCDEFG-*!:_')
'cE!geD-'
>>> num_shorty.expand('cE!geD-', alphabet='abcdefgABCDEFG-*!:_')
123456789

Project details


Download files

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

Files for num-shorty, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size num_shorty-1.0.1.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View hashes

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