Simple, Safe (Atomic) Writes in Python3
Published in
3 min readApr 2, 2021
In sensitive circumstances, trusting a traditional file write can be a costly mistake — a simple power cut before the write is completed and synced may at best leave you with some corrupt data, but depending on what that file is used for you could be in for some serious trouble.
While there are plenty of interesting, weird, or over-engineered solutions available to ensure safe writing, I…