Skip to main content

Atomic file writes.

Project description

https://travis-ci.org/untitaker/python-atomicwrites.svg?branch=master

Atomic file writes.

Features that distinguish it from other similar libraries:

  • Race-free assertion that the target file doesn’t yet exist. This can be controlled with the overwrite parameter.

  • Windows support, although untested. The MSDN resources are not very explicit about which operations are atomic. This requires pywin32.

  • Simple high-level API that wraps a very flexible class-based API.

Usage:

from atomicwrites import atomic_write

with atomic_write('foo.txt') as f:
    f.write('Hello world.')
    # "foo.txt" doesn't exist yet.

# Now it does.

License

Licensed under the MIT, see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atomicwrites-0.1.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

atomicwrites-0.1.2-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file atomicwrites-0.1.2.tar.gz.

File metadata

  • Download URL: atomicwrites-0.1.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for atomicwrites-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4788d40b10d1a832354a35ffa20d592b0a0d4038e3b15adccfbfc966e7886862
MD5 7a65126ed31b9d9d00fd16447c190122
BLAKE2b-256 48991181274826d893fa4dd003ecc09ff0ad62b32409f8d36d8f68129d3c5e8b

See more details on using hashes here.

File details

Details for the file atomicwrites-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: atomicwrites-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for atomicwrites-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 088471b73d3ac375f42b1167b80c3de1e8d7fe2824113b9a1706af21d76ba0e7
MD5 deb49596f39ad2e2961602b4b6c04026
BLAKE2b-256 0f3763bddc74cce777d109fb8eb5cf049727601398fee2f7e9bbd42bacb5f5d0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page