File-based locks for Python for Linux and Windows
conda install main::locket
Locket implements a lock that can be used by multiple processes provided they use the same path.