Skip to content

swenson/shortcodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

shortcodes

This implements URL shortening codes from a random number generator, written in Python.

For more details on what this code is doing, see this blog post.

Usage

If you have a 1-up counter, you can get back a scrambled short code (5 base32 digits), and recover the counter value from the scrambled code like so:

>>> import short_codes
>>> short_codes.short_code(123)
'K8$PN'

>>> short_codes.deshort_code('K8$PN')
123

License

MIT. See LICENSE.

About

URL shortening codes from a random number generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages