skillfed

smmap2

A mirror package for smmap

smmap2 v3.0.1 512.7K downloads/30d#6,254 on PyPI74
License unclear Abandoned released

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 smmap2

uv

uv add smmap2

poetry

poetry add smmap2

Installing 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

memory mapped file accesslarge file random accessmmap resource managementfile descriptor poolingautomatic memory mapping
archivedmemory-mappingdeprecated

More Utilities packages