pytups: smart dictionaries and tuple lists¶
pytups defines two classes, SuperDict and TupList, that can be used instead of pyton dictionaries and lists, respectively, without any loss of functionality. They provide a chaining operator (à la pandas) that makes it very easy to manipulate dictionaries into lists of tuples and vice-versa efficiently. It also permits transforming nested dictionaries into flat ones. They have a ton of helper functions that shorten the number of lines of code need without losing readability of the code.
example using pytups with pulp: https://pchtsp.github.io/pytups/pulp.html