in-place
In-place file processing
Decision gist · record as of 2026-08-14
Yes. Zero dependencies, permissive license, actively maintained, no known vulnerabilities, and solves a common file-handling problem cleanly. Use it whenever you need to safely read and write the same file without manual temporary file management.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or higher.
- Low friction: pure Python wheel with no runtime dependencies.
- Actively maintained as of 2026-07-20 with support across Python 3.8 through 3.13 and PyPy.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2024-12-01 (621 days) · last repo commit 2026-07-20 · 34 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 80,443 downloads/mo, #14,292 on PyPI
Alternatives
Verify before relying
import in_place
with in_place.InPlace("somefile.txt") as fp:
for line in fp:
fp.write(line.upper())What it is and what it does
in_place is a single-class module that wraps the common pattern of reading a file, transforming its contents, and writing back to the same path. Instead of manually juggling temporary files, backups, and atomic renames, you pass a filename to InPlace and get a context manager that yields a read-write filehandle; data you write replaces the original file, and the module handles all the temporary file cleanup and safe replacement. It supports both text and binary modes, custom encodings, and optional backup creation (either by appending an extension or saving to a separate path).
Compared to Python's fileinput module, in_place returns a proper filehandle rather than hijacking sys.stdout, supports all standard I/O methods, allows full control over encoding and newline handling, and rolls back the original file if an exception occurs during processing. It's useful for command-line tools, log processors, configuration file editors, and any script that needs to safely modify files in place without risking data loss.
Use it for
- Transform text files (e.g., remove vowels, convert case, apply regex substitutions) while preserving the original path.
- Process log files or configuration files with automatic backup creation for safety and auditability.
- Implement sed-like filtering in Python without manual temporary file and rename logic.
- Build command-line tools that modify files in-place with optional rollback on error.
- Edit binary files (e.g., patch headers, strip metadata) with atomic replacement and optional backup.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Zero dependencies, permissive license, actively maintained, no known vulnerabilities, and solves a common file-handling problem cleanly. Use it whenever you need to safely read and write the same file without manual temporary file management.
Install
in-place on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of 2026-07-20 with support across Python 3.8 through 3.13 and PyPy.
Requires Python 3.8 or higher.
License in practice
MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
import in_place
with in_place.InPlace("somefile.txt") as fp:
for line in fp:
fp.write(line.upper())
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 621 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 80,443 / month, #14,292 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: System :: FilesystemsTopic :: Text Processing :: FiltersTyping :: Typed |
Evidence: in_place-1.0.1-py3-none-any.whl
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 › “in-place file editing”
- in-placeProvides an InPlace class for reading and writing files in-place,…
- codemod-yamlModifies YAML documents in place with surgical precision, preserving…
- python-editorProgrammatically open your system's $EDITOR from Python, capture…
Give your agent the search over MCP, or paste the wish link into any chat.
More Filters packages
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.
Install it if you need to parse Markdown in Python.
NLTK is a Python library for natural language processing tasks including tokenization, parsing, tagging, and linguistic analysis, with built-in datasets and educational resources.
Install it if you need foundational NLP tools, linguistic datasets, or are learning the field; consider specialized libraries (spaCy, transformers) if you need…
Provides Python utilities for writing pandoc filters that transform document ASTs by reading JSON from stdin, modifying the structure, and writing JSON to stdout.
Converts Unicode text to ASCII-safe representations by transliterating non-ASCII characters to their closest ASCII equivalents, useful for generating URL slugs, legacy system integration, and keyboard-friendly identifiers.
Install it if you need lossy Unicode-to-ASCII conversion and can accept GPLv2+ copyleft terms.
Pymdown Extensions provides a collection of additional extensions for Python Markdown that add syntax support for advanced formatting, including tabbed content, superfences with syntax highlighting, emoji, and other markup enhancements.
Install it if you need markdown features beyond the standard library.
See also javaproperties · bz2file · file-read-backwards · editor · codemod-yaml · gitmatch · borgbackup · memory-tempfile · atomicwrites · atomicwrites-homeassistant