Using an alphabet like "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ" I'd like to generate 2 to 4 letter codes to identify unique datastore entries. I have a python function capable of doing this when passed an list indicating the letter positions of the last code [7,17,11] -> "7GA". the next code can be made by incrementing that right most element by one and carrying one up when the alphabet length is exceeded.
This method has the advantage of keeping codes short, sequential, consistent, easy to communicate, and looking how I want them to.
I'm wondering though if this would work on app engine since the function must hold onto or be passed the last identifier to enforce uniqueness which may not play well with the non-continuous nature of Google's infrastructure. Alternate ways to make this happen or reasoned arguments against it are welcome.