A pure-Python library (built on ctypes) that lets you inspect, modify and search the memory of any running process in a few lines of Python โ Cheat Engine workflows on Windows, Linux and macOS!
Read, write and scan the memory of any process โ straight from Python.
One unified API. Three operating systems. No C compiler. No native build step.
Runs on ๐ช Windows ยท ๐ง Linux ยท ๐ macOS โ 32-bit and 64-bit.
Tweak a value in a running game ยท inspect a live program's state ยท harvest data straight from RAM.
pip install PyMemoryEditorTo also install the bundled GUI app (a Cheat Engine-style scanner), use the app extra:
pip install "PyMemoryEditor[app]"
pymemoryeditorFor faster scans on large processes, add the speed extra. It pulls in NumPy
and automatically vectorizes the numeric scan comparison loop โ ~10โ30ร faster on
selective scans:
pip install "PyMemoryEditor[speed]"๐ Full guide at Read the Docs.
from PyMemoryEditor import OpenProcess
with OpenProcess(name="game.exe") as process:
# Scan the whole process for every address holding the value 100.
for address in process.search_by_value(int, value=100):
print(f"Found at 0x{address:X}")
# Read the current value, then write a new one back.
current = process.read_int(address)
process.write_int(address, current + 500)That's it โ read, write or scan another process in three lines, the same way on every platform.
Full control over another process's memory โ in a few lines of Python:
- โ
Read & write values (
int,float,bool,str,bytes) - ๐ Value scan with eight comparison modes
- ๐ฏ Pattern scan (IDA-style AOB & regex)
- ๐ Pointer chains + a live
RemotePointerhandle - ๐งญ Pointer scan โ find static pointers that survive ASLR
- ๐บ๏ธ Memory map, modules, threads
- ๐งฑ Allocate & free remote memory (Windows / macOS)
All the library's power โ no code required:
- โก Zero setup โ attach to a process and start scanning in seconds
- ๐งฒ Refine workflow โ First Scan โ Next Scan with live visual feedback
- ๐ Cheat table โ freeze / write values on the fly, JSON import/export
- ๐ฌ Hex viewer โ browse raw memory and write back inline
- ๐งฉ Pointer scan UI โ scan, export & rescan across sessions with a few clicks
- ๐จ One-click access โ every feature at your fingertips, no code needed
Full documentation lives at pymemoryeditor.readthedocs.io โ installation, the Cheat Engine workflow, every method and parameter, the GUI app guide, platform notes and troubleshooting.
A quick map of where to go:
| Quick Start | Open a process, read, write and run your first scan. |
| Searching memory | Value scans, ranges, refining results, the Cheat Engine loop. |
| Pattern scan | Find code/data with byte signatures (AOB) and regex. |
| Pointers | Multi-level pointer chains and the live RemotePointer. |
| Pointer scan | Find static pointers that survive ASLR. |
| The GUI app | The bundled Cheat Engine-style scanner. |
| API reference | Every public class, method and parameter. |
| Platform notes | Permissions and quirks on Windows, Linux and macOS. |
| Troubleshooting | Common errors and how to fix them. |
- ๐ฎ Game modding & speedrunning tools โ the classic Cheat Engine use case.
- ๐ฌ Debugging & introspection โ inspect live state without attaching a debugger.
- ๐ Observability tooling โ sample variables in a running process for telemetry.
- ๐ Security & reverse-engineering research โ on systems you own or are authorized to test.
- ๐ Learning โ the bundled app is a great teaching tool for how memory scanning works.
Note
Responsible use. PyMemoryEditor talks to other processes through OS-level APIs. Only point it at processes you own or have explicit permission to inspect.
Pull requests, bug reports and feature ideas are very welcome. Read
CONTRIBUTING.md for the development setup, test layout and
the small set of platform-specific quirks to be aware of.
If PyMemoryEditor helped your project, please โญ the repo โ it's the easiest way to support the work and to help others discover the library.
Released under the MIT License โ free for personal and commercial use.
