smmap
A pure Python implementation of a sliding window memory map manager
Install
smmap on PyPI
pip
pip install smmapuv
uv add smmappoetry
poetry add smmapPackage 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 — 157 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: smmap-5.0.3-py3-none-any.whl
About smmap
from the package's own PyPI description — quoted content, verbatim
Motivation
When reading from many possibly large files in a fashion similar to random access, it is usually the fastest and most efficient to use memory maps.
Although memory maps have many advantages, they represent a very limited system resource as every map uses one file descriptor, whose amount is limited per process. On 32 bit systems, the amount of memory you can have mapped at a time is naturally limited to theoretical 4GB of memory, which may not be enough for some applications.
Limitations
- System resources (file-handles) are likely to be leaked! This is due to the library authors reliance on a deterministic
__del__()destructor. - The memory access is read-only by design.
Overview
Smmap wraps an interface around mmap and tracks the mapped files as well as the amount of clients who use it. If the system runs out of resources, or if a memory limit is reached, it will automatically unload unused maps to allow continued operation.
To allow processing large files even on 32 bit systems, it allows only portions of the file to be mapped. Once the...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Smmap provides a sliding-window memory map manager that automatically handles file mapping and unmapping across system resource limits, allowing efficient random access to large files even on 32-bit systems by mapping only needed portions on demand.
Installation is straightforward with no runtime dependencies and low friction. However, the repository is archived and marked abandoned as of the fact sheet date, with no active maintenance despite being marked Production/Stable.
Licensed under BSD-3-Clause (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.
Usage
pip install smmap==5.0.3
from smmap.mmap import SlidingWindowMapManager
manager = SlidingWindowMapManager()
window = manager.map(filename, offset, size)
Python 3.7+ required; read-only memory access by design; file handles may leak due to reliance on __del__() destructors as noted in the documentation.
Verdict: Smmap is a stable, dependency-free memory mapping utility suitable for efficient large-file access, but its abandoned repository status and documented resource-leak risk via __del__() should weigh heavily in production decisions. Use only if the read-only, auto-mapping semantics fit your workload and you can tolerate potential file descriptor leaks.
Needs verification
- Whether the file descriptor leak risk documented in the description remains unresolved in version 5.0.3 or has workarounds
- Current adoption and maintenance status of dependent packages that rely on smmap
- Performance characteristics compared to alternatives for your specific file access patterns
Similar packages
permissive · top 1,000 on PyPI
watchdogpermissive · top 1,000 on PyPI
bitarraypermissive · top 1,000 on PyPI
gitdbpermissive · top 1,000 on PyPI
limitspermissive · top 1,000 on PyPI
pyrsistentpermissive · top 1,000 on PyPI
pydeckpermissive · top 1,000 on PyPI
pgvectorpermissive · top 1,000 on PyPI
rpds-pypermissive · top 100 on PyPI
ml-dtypespermissive · top 1,000 on PyPI