Skip to main content

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

Project description

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

for example

import string

from intstr import IntStr
ALPHABET = string.ascii_uppercase + string.ascii_lowercase + string.digits + '-_'

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.

Source Distribution

intstr-0.1.tar.gz (1.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page