memory-tempfile
Helper functions to identify and use paths on the OS (Linux-only for now) where RAM-based tempfiles can be created.
Decision gist · record as of 2026-08-14
Yes, if you are on Linux and need to reduce I/O overhead from temporary files. The package is simple, dependency-free, and solves a specific problem well. However, it is dormant (no releases since 2020); install it only if the stable API meets your needs and you do not expect active maintenance or new features. Not suitable for non-Linux platforms.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Linux only; requires access to /proc/self/mountinfo.
- Python 3.6 or later.
- Low friction to install.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use this package freely in proprietary or open-source projects with minimal restrictions.
last release 2020-03-11 (2347 days) · last repo commit 2024-05-15 · 41 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 636,224 downloads/mo, #5,628 on PyPI
Alternatives
Verify before relying
from memory_tempfile import MemoryTempfile
tempfile = MemoryTempfile()
with tempfile.TemporaryFile() as tf:
tf.write(b'data')- Whether the package correctly handles all modern tmpfs mount configurations beyond /tmp, /run/user/{uid}, /run/shm, and /dev/shm.
- Performance characteristics when searching for suitable paths on systems with many mount points.
- Compatibility with containerized or restricted environments beyond chroot and namespaces.
What it is and what it does
memory-tempfile wraps Python's standard tempfile module to automatically detect and use RAM-based filesystems (tmpfs, ramfs) for temporary files on Linux. Instead of writing to physical disk, it searches a prioritized list of in-memory paths—/tmp, /run/user/{uid}, /run/shm, /dev/shm—and uses the first one that exists and is backed by a memory filesystem. This avoids the I/O overhead and wear on storage media that comes from repeated temporary file creation.
The package exposes a MemoryTempfile class that mirrors the standard tempfile API (TemporaryFile, NamedTemporaryFile, etc.) but with configurable path search order, filesystem type filters, and fallback behavior. You can customize which paths to search, add or exclude specific directories, and choose whether to fall back to the system default tempdir if no memory-based path is found. All path templates with {uid} are automatically replaced with the current user ID.
Use it for
- Reduce I/O overhead when external tools require temporary files but you want to avoid disk writes.
- Minimize storage wear in embedded or long-running systems that create many temporary files.
- Speed up test suites that generate and discard temporary files repeatedly.
- Work with external command-line tools that write output to disk but cannot pipe directly to your application.
- Configure fallback behavior for temporary file creation in restricted or containerized environments.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are on Linux and need to reduce I/O overhead from temporary files.
The package is simple, dependency-free, and solves a specific problem well. However, it is dormant (no releases since 2020); install it only if the stable API meets your needs and you do not expect active maintenance or new features. Not suitable for non-Linux platforms.
Install
memory-tempfile on PyPI
Before you install
Low friction to install. The package is dormant (last release March 2020, last commit May 2024) but has no runtime dependencies and is a pure Python wheel. Suitable for stable, narrow-scope use cases; not actively maintained for new features.
Linux only; requires access to /proc/self/mountinfo. Python 3.6 or later.
License in practice
MIT license is permissive; you can use this package freely in proprietary or open-source projects with minimal restrictions.
Quickstart
from memory_tempfile import MemoryTempfile
tempfile = MemoryTempfile()
with tempfile.TemporaryFile() as tf:
tf.write(b'data')
Verify before relying
- Whether the package correctly handles all modern tmpfs mount configurations beyond /tmp, /run/user/{uid}, /run/shm, and /dev/shm.
- Performance characteristics when searching for suitable paths on systems with many mount points.
- Compatibility with containerized or restricted environments beyond chroot and namespaces.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6,<4.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 2,347 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 636,224 / month, #5,628 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 :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8 |
Evidence: memory_tempfile-2.2.3-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 › “ram temporary files linux”
- memory-tempfileIdentifies and provides access to RAM-based temporary file…
- volatility3Volatility 3 is a memory forensics framework that extracts and…
- alibabacloud-credentialsManages authentication credentials for Alibaba Cloud services,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
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.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also backports.tempfile · editor · pathmagic · inotify · morefs · tempenv · in-place · fatfs-ng · win32-setctime