smmap
A pure Python implementation of a sliding window memory map manager, currently at version 5.0.3, released on March 9, 2026. It is actively maintained with regular updates, including support for newer Python versions and improvements in continuous integration workflows.
Warnings
- breaking Version 6.0.0 dropped support for Python 3.6 and 3.7, and declared support for Python 3.11 and 3.12.
- deprecated Version 5.0.0 dropped support for Python 3.5.
- gotcha Ensure that the smmap package is installed in the correct Python environment to avoid ImportError.
Install
-
pip install smmap
Imports
- MemoryMap
from smmap import MemoryMap
Quickstart
import os
from smmap import MemoryMap
# Initialize a MemoryMap instance
mm = MemoryMap('example.txt')
# Read data from the memory-mapped file
with mm as m:
data = m.read(1024)
print(data)