Skip to content

About

URL shortening codes from a random number generator

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

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

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages