I would simply use code like the following to set up a couple of translation tables, one from node to ASCII, the other to go back the other way.
The sample code below provides 36
nodes for one-character, 1,332
for up to two characters, 47,998
for up to three characters and a whopping 1,727,604
for up to four characters but you should start being wary about the sizes of the tables at that point (run-time conversion, rather than pre-calculating lookup tables, may be a better option if you get to that point).
Keep in mind that this was with digits and lowercase letters only. If you decide to use uppercase, the quantities are:
length = 1 node count = 62
2 3,906
3 242,234
4 15,018,570
Sample code follows below:
nd_to_asc = []
asc_to_nd = {}
full_range = range(48,58) + range(97,123)
# One, two, three and four-length codes.
for p1 in full_range:
nd_to_asc.append (chr(p1))
for p2 in full_range:
nd_to_asc.append ("%s%s"%(chr(p1),chr(p2)))
for p3 in full_range:
nd_to_asc.append ("%s%s%s"%(chr(p1),chr(p2),chr(p3)))
for p4 in full_range:
nd_to_asc.append ("%s%s%s%s"%(chr(p1),chr(p2),chr(p3),chr(p4)))
# Reverse lookup.
for i in range(len(nd_to_asc)):
asc_to_nd[nd_to_asc[i]] = i
print len(nd_to_asc)