ID to Filename Python Module

Module to convert an integer id to a filepath for storage system.

Mathematically, this is a bijective set of methods. This means that running filename2id(id2filename(ID)) must return the same ID passed and conversely id2filename(filename2id(PATH)) must return the same PATH passed.

Example usage:

>>> id2filename(1234)
>>> filename2id('/d2/4d2')

Convert a filepath to and ID.


Algorithm for getting filepath from an integer id.