atomicwrites
Atomic file writes.
Decision gist · record as of 2026-08-14
No. The package is abandoned (last updated July 2022, repository archived) and will not receive security patches or compatibility fixes for modern Python versions. While the core functionality is simple and has no dependencies, the lack of maintenance makes it unsuitable for new projects. Consider using a maintained alternative or implementing atomic writes directly with tempfile and os.replace, which is available in the standard library.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- High install friction; the package is abandoned (last commit 2022-07-08, repository archived) and has not been updated in over 1498 days.
- No runtime dependencies, but the lack of maintenance means security issues or compatibility problems with newer Python versions will not be addressed.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and imposes no restrictions on use, modification, or distribution in proprietary or commercial projects.
last release 2022-07-08 (1498 days) · last repo commit 2022-07-08 · 321 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,753,299 downloads/mo, #2,240 on PyPI
Alternatives
Verify before relying
from atomicwrites import atomic_write
with atomic_write('foo.txt', overwrite=True) as f:
f.write('Hello world.')- Whether the package works reliably on modern Python versions (3.9+) given its abandonment since 2022.
- Whether Windows atomicity guarantees hold on current NTFS implementations, given the documented uncertainty in the MSDN comment cited.
- Whether fsync behavior on modern filesystems and SSDs provides the durability guarantees the documentation implies.
What it is and what it does
Atomicwrites provides a simple context manager that ensures file writes complete fully or not at all, preventing corruption from interrupted writes or concurrent access. It works by writing to a temporary file in the same directory, then atomically moving it to the target location using platform-specific operations: rename on POSIX systems (with optional link-and-unlink for non-overwrite cases), and MoveFileEx on Windows via ctypes. The library includes fsync calls to flush both file content and directory metadata on POSIX systems, and _commit on Windows, though it does not guarantee protection against disk-level buffering.
The package has no runtime dependencies and supports Python 2.7 and 3.4 through 3.8 according to its classifiers. It is designed to be a lightweight, cross-platform alternative to manual temp-file-and-rename patterns, with a high-level API wrapping a flexible class-based interface. However, the project is abandoned and has not been updated since July 2022, meaning new Python versions, security issues, and platform changes will not be addressed.
Use it for
- Writing configuration files or state that must not be left in a partial or corrupted state if the process crashes or is interrupted.
- Coordinating file updates across multiple processes or threads where a partially-written file could cause readers to fail or see inconsistent data.
- Ensuring database-like durability for single-file data stores or caches that require atomic all-or-nothing semantics.
- Cross-platform applications that need consistent atomic-write behavior on both POSIX and Windows without platform-specific code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last updated July 2022, repository archived) and will not receive security patches or compatibility fixes for modern Python versions. While the core functionality is simple and has no dependencies, the lack of maintenance makes it unsuitable for new projects. Consider using a maintained alternative or implementing atomic writes directly with tempfile and os.replace, which is available in the standard library.
Install
atomicwrites on PyPI
Before you install
High install friction; the package is abandoned (last commit 2022-07-08, repository archived) and has not been updated in over 1498 days. No runtime dependencies, but the lack of maintenance means security issues or compatibility problems with newer Python versions will not be addressed.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution in proprietary or commercial projects.
Quickstart
from atomicwrites import atomic_write
with atomic_write('foo.txt', overwrite=True) as f:
f.write('Hello world.')
Verify before relying
- Whether the package works reliably on modern Python versions (3.9+) given its abandonment since 2022.
- Whether Windows atomicity guarantees hold on current NTFS implementations, given the documented uncertainty in the MSDN comment cited.
- Whether fsync behavior on modern filesystems and SSDs provides the durability guarantees the documentation implies.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,498 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 4,753,299 / month, #2,240 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: Implementation :: CPython |
Evidence: atomicwrites-1.4.1.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “atomic file write”
- atomicwritesProvides a context manager for writing files atomically—writing to a…
- pathlib-mateExtends Python's pathlib.Path with convenience attributes and methods…
- in-placeProvides an InPlace class for reading and writing files in-place,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also atomicwrites-homeassistant · types-atomicwrites · filelock · DrissionRecord · django-read-only · pathlib-mate · azure-storage-file · ephemeral-port-reserve · burner-redis · pathtools