The original version of this script was written by Fahrstuhl. Checkout his blog post and his Gist.
Renaming i3 workspaces with https://github.com/acrisci/i3ipc-python while keeping the <number>: <letter> prefix for keyboard navigation. Just add bindsym Mod4+q exec "python ~/.i3/renameworkspace.py"
to your i3 config.