Skip to main content

int encode to string & string decode to int , can use in url shorten with a auto incr id

Project description

for example:

import string

ALPHABET = string.ascii_uppercase + string.ascii_lowercase +                string.digits + '-_'

intstr = IntStr(ALPHABET)

s = intstr.encode(1234567)
print s
print intstr.decode(s)

intstr = IntStr(ALPHABET,"$")

s = intstr.encode(-1234567)
print s
print intstr.decode(s)

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 intstr, version 0.12
Filename, size File type Python version Upload date Hashes
Filename, size intstr-0.12.tar.gz (1.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page