smmap2
A mirror package for smmap
What it is and what it does
Smmap2 provides a wrapper around mmap that manages memory-mapped file access with automatic resource pooling. It tracks open file mappings and unloads unused ones using an LRU algorithm when the system runs low on file descriptors or memory, allowing applications to work with files larger than available address space—particularly useful on 32-bit systems. The package offers both a low-level native interface for performance-critical code and a higher-level Buffer interface that presents mapped regions as a string-like object.
However, this package is archived and abandoned as of 2020. Its entire history and ongoing maintenance have been consolidated into the GitPython repository. The description explicitly warns that file handles may leak due to reliance on deterministic __del__() destructors, and the package is read-only by design. New projects should use the maintained version within GitPython rather than this mirror.
Use it for:
- Processing very large files with random access patterns on memory-constrained or 32-bit systems
- Building tools that need to map portions of files without exhausting system file descriptors
- Legacy code that depends on smmap2 specifically and cannot migrate to the consolidated GitPython version
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
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.
No. This package is abandoned and archived; its maintenance has moved to GitPython. The description warns of file-handle leaks, the license is unclear, and the last release was in 2020. Use the smmap module maintained within GitPython instead, or use the canonical smmap package if you need a standalone version.
Install
smmap2 on PyPI
pip
pip install smmap2uv
uv add smmap2poetry
poetry add smmap2Installing smmap2
Before you install
Installation is low-friction, but the package is abandoned as of 2020 and archived. The repository has been consolidated into GitPython; new code should use the maintained version there instead.
License in practice
License treatment is unclear—the description states New BSD License but the metadata contains no SPDX identifier or raw license text. Verify the actual license before relying on this package in proprietary or restricted contexts.
Quickstart
pip install smmap2
from smmap import SlidingWindowMapManager
mgr = SlidingWindowMapManager(filename)
Requires Python 3.7+. The package relies on deterministic __del__() destructors, which can leak file handles in some contexts.
Verify before relying
- Whether smmap2 is a true mirror or a separate fork, and if it receives any maintenance distinct from the canonical smmap in GitPython
- Current status of file-handle leaks mentioned in the description and whether they have been addressed
- Whether the package works correctly on modern Python versions beyond 3.7
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — smmap |
| Maintenance | abandoned — 2,364 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 512,739/month — #6,254 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: smmap2-3.0.1-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
smmapSmmap provides a sliding-window memory map…
permissive · top 1,000 on PyPI
gitdb2Provides low-level read and write access to…
unclear · top 15,000 on PyPI
mmgpOptimizes GPU memory usage for running large…
unclear · top 15,000 on PyPI
YORMYORM maps Python object attributes…
permissive · top 15,000 on PyPI
leafmapLeafmap enables interactive geospatial mapping…
permissive · top 15,000 on PyPI
remotezip2Reads and extracts files from ZIP archives…
permissive · top 15,000 on PyPI
plotbinPlotBin provides utilities to create and…
unclear · top 15,000 on PyPI
bloom-filter2A pure Python implementation of a Bloom…
permissive · top 15,000 on PyPI
immutablesProvides an immutable mapping type backed by a…
permissive · top 5,000 on PyPI
gitdbGitDB provides low-level read and write access…
permissive · top 1,000 on PyPI