smmap
A pure Python implementation of a sliding window memory map manager
Decision gist · record as of 2026-08-14
Yes, if you need efficient random-access reads from large files and can tolerate the abandoned maintenance status. The library is stable and widely used (top 1000 on PyPI), has no known vulnerabilities, and low install friction. However, be aware that the repository is archived with no active development, and the documented risk of file handle leaks via __del__() destructors means you should test thoroughly in your specific deployment scenario before relying on it for production workloads.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.7 or later.
- The library relies on deterministic __del__() destructors for resource cleanup, which may leak file handles in some edge cases.
- Installation is straightforward with no runtime dependencies.
License · maintenance · safety
BSD-3-Clause (permissive) — Licensed under BSD-3-Clause (permissive), allowing use in most commercial and open-source projects with minimal restrictions beyond attribution.
last release 2026-03-09 (158 days) · last repo commit 2026-07-26 · 74 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 249,781,606 downloads/mo, #158 on PyPI
Alternatives
Verify before relying
pip install smmap
from smmap.mmap_manager import SlidingWindowMapManager
manager = SlidingWindowMapManager()
window = manager.map(filename, offset, size)- Whether the abandoned status and reliance on __del__() for cleanup poses practical risks in production environments with long-running processes.
- Current performance characteristics compared to alternatives for typical workloads on modern systems.
- Whether file handle leaks mentioned in the description remain unresolved in version 5.0.3.
What it is and what it does
Smmap is a pure Python memory map manager that wraps the standard mmap interface to handle the practical constraints of mapping large files. It automatically manages partial file mapping using a sliding-window approach, so you can read from files larger than your system's addressable memory by mapping only the regions you need. When the system runs low on file descriptors or reaches a memory limit, smmap automatically unloads unused mappings using an LRU algorithm to free resources and keep your application running.
The package is designed for scenarios where random-access reads from large files are frequent and efficient. It offers both a native interface for performance-critical code and a simpler Buffer wrapper that presents a string-like interface. However, the library is read-only by design and relies on Python's garbage collector and __del__() destructors to clean up resources, which the documentation warns may leak file handles in some situations.
Use it for
- Reading specific regions of large binary files (e.g., disk images, database files) without loading them entirely into memory.
- Processing multiple large files concurrently while staying within system file descriptor limits through automatic unloading.
- Building tools that need random-access file I/O on 32-bit systems where addressable memory is naturally limited.
- Implementing efficient caching layers for file-based data structures that benefit from memory-mapped access patterns.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need efficient random-access reads from large files and can tolerate the abandoned maintenance status.
The library is stable and widely used (top 1000 on PyPI), has no known vulnerabilities, and low install friction. However, be aware that the repository is archived with no active development, and the documented risk of file handle leaks via __del__() destructors means you should test thoroughly in your specific deployment scenario before relying on it for production workloads.
Install
smmap on PyPI
Before you install
Installation is straightforward with no runtime dependencies. However, the repository is archived and marked abandoned, meaning no active maintenance or bug fixes should be expected going forward.
Requires Python 3.7 or later. The library relies on deterministic __del__() destructors for resource cleanup, which may leak file handles in some edge cases.
License in practice
Licensed under BSD-3-Clause (permissive), allowing use in most commercial and open-source projects with minimal restrictions beyond attribution.
Quickstart
pip install smmap
from smmap.mmap_manager import SlidingWindowMapManager
manager = SlidingWindowMapManager()
window = manager.map(filename, offset, size)
Verify before relying
- Whether the abandoned status and reliance on __del__() for cleanup poses practical risks in production environments with long-running processes.
- Current performance characteristics compared to alternatives for typical workloads on modern systems.
- Whether file handle leaks mentioned in the description remain unresolved in version 5.0.3.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 158 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 249,781,606 / month, #158 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXProgramming Language :: PythonProgramming 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.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: smmap-5.0.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 › “memory map manager python”
- smmapSmmap provides a sliding-window memory map manager that automatically…
- librmm-cu12librmm-cu12 provides GPU memory allocation and management for CUDA 12…
- rmm-cu12RMM provides a common interface for customizing GPU and host memory…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Smmap2 is a mirror package that wraps memory-mapped file access with automatic resource management, allowing efficient random access to large files while staying within system limits by unloading unused mappings.
Optimizes GPU memory usage for running large generative models on consumer GPUs with limited VRAM by managing model loading, quantization, and offloading.
However, verify the unclear license status before use in proprietary work, and test your specific model and hardware combination first.
Retrieves and manages semantic prefix maps that convert compact URIs (like `skos`) to their full namespace URIs, with support for multiple sources and clash-resilient prefix ordering.
Leafmap enables interactive geospatial mapping and analysis in Jupyter notebooks with minimal code, combining vector and raster data visualization, interactive editing, and backend analysis tools.
Annoy searches for approximate nearest neighbors in high-dimensional vector spaces using a C++ library with Python bindings, and stores indexes as memory-mapped files that multiple processes can share.
YORM maps Python object attributes bidirectionally to YAML files, automatically synchronizing changes between in-memory objects and text-based storage.
See also vacuum-map-parser-roborock · umf · immutables · pmtiles