atomicfile

Writeable file object that atomically updates a file
Download

atomicfile Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Price:
  • FREE
  • Publisher Name:
  • Alexander Saltanov
  • Publisher web site:
  • http://github.com/sashka/

atomicfile Tags


atomicfile Description

atomicfile is a writeable file object that atomically updates a file.All writes will go to a temporary file. Call close() explicitly when you are done writing, and AtomicFile will rename the temporary copy to the original name, making the changes visible. If the object is destroyed without being closed, all your writes are discarded.AtomicFile is friendly to with statement.from atomicfile import AtomicFilewith AtomicFile("panic.txt", "w") as f: f.write(json.dumps(big_data_array_100MB, sort_keys=True, indent=4))InstallTo install AtomicFile, simply:pip install atomicfileProduct's homepage


atomicfile Related Software