What I have so far is largely based off page 571 of \"Introduction To Algorithms\" by Cormen et al.
I have a Node class in python that represents a set:
Using this implementation as a starting point, I've created a new python class to handle disjoint sets, which also supports persistence using a MongoDb.
With my class you should be able, for example, to:
UnionFind(), which uses python build-in dictionaries by default, and decide later to consolidate() your results in a MongoDb collection You might want to check the code on github.
Cheers, Simone