Strict two-phase locking implemented in Python. [College project]