Pymem
python memory access made easy
What it is and what it does
Pymem is a Python library that lets you interact with Windows processes directly from your code, reading and writing memory at arbitrary addresses. It works with both 32-bit and 64-bit processes and supports modern Python versions (3.8 through 3.12). The library handles the low-level details of attaching to a process, enumerating its modules, and performing memory operations, so you can focus on what you want to do with that access.
Common use cases include inspecting process state for debugging or reverse engineering, modifying game memory or application behavior at runtime, and injecting Python code into running processes to execute arbitrary logic within their address space. The package is actively maintained and has no known security vulnerabilities.
Use it for:
- Inspect and modify game memory or application state at runtime for testing or reverse engineering.
- Inject Python code into a running process to execute logic within its context and interact with its memory.
- Enumerate loaded modules and memory layout of a Windows process for debugging or analysis.
- Patch application behavior by writing to specific memory addresses without modifying the executable.
- Automate interaction with legacy or closed-source Windows applications by manipulating their memory directly.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pymem provides direct read and write access to Windows process memory, allowing you to inspect and modify running processes at the byte level from Python.
Yes, if you need direct Windows process memory access from Python. The package is actively maintained, has no dependencies, installs easily, and carries a permissive license. Be aware that this is a low-level tool requiring careful use—memory manipulation can crash processes or introduce security risks if misused, and it typically requires elevated privileges.
Install
pymem on PyPI
pip
pip install pymemuv
uv add pymempoetry
poetry add pymemInstalling Pymem
Before you install
Low friction to install; the package is a pure Python wheel with no runtime dependencies. Maintenance is active with recent commits and steady development since 2015.
License in practice
MIT license is permissive; you can use, modify, and distribute pymem freely in commercial and private projects with minimal restrictions.
Quickstart
import pymem
pm = pymem.Pymem('notepad.exe')
modules = list(pm.list_modules())
for module in modules:
print(module.name)
Requires Windows OS and typically administrator privileges to attach to processes.
Verify before relying
- Whether the package requires administrative privileges to attach to processes.
- Compatibility with Windows versions other than those implied by the classifiers.
- Whether injected Python code runs in the target process's Python interpreter or in a separate instance.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 656 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 153,605/month — #10,875 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pymem-1.14.0-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pyxbeParse, inspect, and manipulate XBE executable…
permissive · top 15,000 on PyPI
win32-setctimeSets file creation time on Windows systems via…
permissive · top 5,000 on PyPI
PyAutoItPyAutoIt provides Python bindings to…
permissive · top 15,000 on PyPI
uiautomationAutomates Windows UI controls and windows by…
permissive · top 15,000 on PyPI
yacmanYacman provides a Python interface for reading,…
permissive · top 15,000 on PyPI
PyByteBufferPyByteBuffer provides Java ByteBuffer-style…
copyleft · top 5,000 on PyPI
PyRICPyRIC provides programmatic control over Linux…
copyleft · top 15,000 on PyPI
plumbumPlumbum lets you write shell-script-like…
permissive · top 5,000 on PyPI
editorOpens your system's default text editor (or a…
permissive · top 5,000 on PyPI
pyteomicsPyteomics provides Python tools for proteomics…
permissive · top 15,000 on PyPI