skillfed

Pymem

python memory access made easy

pymem v1.14.0 153.6K downloads/30d#10,875 on PyPI381
Permissive license MIT Active released

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 pymem

uv

uv add pymem

poetry

poetry add pymem

Installing 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

Environment :: Win32 (MS Windows)Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

windows process memory manipulationread write process memory pythonwindows memory hacking libraryprocess memory access windowsinject code into windows processmemory patching windowsprocess inspection windows
windows-internalsreverse-engineeringmemory-manipulation

More Software Development packages