--- id: atomicwrites-homeassistant version: "1.4.1" license: MIT license_treatment: permissive maintenance: abandoned --- # atomicwrites-homeassistant — Atomic file writes. License: permissive · Maintenance: abandoned · Downloads: 662.3K/mo ## What it is and what it does Atomicwrites is a Python library for writing files in a way that guarantees atomicity—either the entire file is written successfully or the original file remains untouched. 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 (or `link`/`unlink` when overwriting is not allowed) and `MoveFileEx` on Windows. The library also invokes `fsync` to ensure data is flushed to disk. The package provides both a simple high-level context-manager API and a lower-level class-based interface. It supports an `overwrite` parameter to control whether the target file may already exist, and handles errors consistently across platforms. With no runtime dependencies, it integrates easily into any Python project that needs to safely write configuration files, databases, or other critical data without risk of corruption from crashes or concurrent access. Use it for: - Writing configuration files that must not be corrupted if the process crashes mid-write - Atomically updating database or cache files in multi-process environments - Safely persisting application state or logs without risk of partial writes - Cross-platform file operations where atomicity guarantees are required ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides atomic file writes that ensure a file is either fully written or not written at all, preventing corruption from interrupted writes or concurrent access. No—this package is abandoned (last release 2022-07-08, repository archived) and shows no active maintenance. While the code is stable and has no known vulnerabilities, using an unmaintained library for critical file operations carries long-term risk. Consider the original atomicwrites package if it has resumed maintenance, or evaluate whether your use case truly requires atomic writes or can tolerate simpler alternatives. ## Install pip install atomicwrites-homeassistant uv add atomicwrites-homeassistant poetry add atomicwrites-homeassistant ## Installing atomicwrites-homeassistant Before you install: Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2022-07-08 and the repository is archived. This is a fork maintained because the original package is unmaintained, but the fork itself shows no active maintenance either. License in practice: Licensed under MIT (permissive), so you can use it freely in commercial and open-source projects without restriction or obligation to share modifications. Quickstart: from atomicwrites import atomic_write with atomic_write('foo.txt', overwrite=True) as f: f.write('Hello world.') Verify before relying: - Whether this fork is actively maintained or has a clear succession plan despite the archived repository status - Real-world reliability of Windows atomic operations, which the documentation notes are not well-tested and may silently fall back to non-atomic methods ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 662.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags atomic file writes, safe file writing, prevent file corruption, transactional file operations, race-free file creation, temporary file atomicity, cross-platform file safety, file-io, cross-platform [View on SkillFed](https://skillfed.io/packages/atomicwrites-homeassistant) · [View on PyPI](https://pypi.org/project/atomicwrites-homeassistant/)