Skip to content

JeanExtreme002/PyMemoryEditor

PyMemoryEditor

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.

📖 Full guide at Read the Docs.

Python Package Pypi License Platforms Python Version Downloads

PyMemoryEditor logo

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.

Tweak a value in a running game · inspect a live program's state · harvest data straight from RAM.

PyMemoryEditor app attached to a running process

Runs on 🪟 Windows · 🐧 Linux · 🍎 macOS — 32-bit and 64-bit, with the same code on all three.


Install

pip install PyMemoryEditor

To also install the bundled GUI app (a Cheat Engine-style scanner), use the app extra:

pip install "PyMemoryEditor[app]"
pymemoryeditor

See it in action

from PyMemoryEditor import OpenProcess

with OpenProcess(process_name="game.exe") as process:

    # Scan the whole process for every address holding the value 100.
    for address in process.search_by_value(int, 4, 100):
        print(f"Found at 0x{address:X}")

    # Write a new value at a known address.
    process.write_process_memory(0x006A9EC0, int, 4, 9999)

That's it — read, write or scan another process in three lines, the same way on every platform.


What's inside

🐍 The Python library

  • Read & write values (int, float, bool, str, bytes)
  • 🔍 Value scan with eight comparison modes
  • 🎯 Pattern scan (IDA-style AOB & regex)
  • 🔗 Pointer chains + a live RemotePointer handle
  • 🧭 Pointer scan — find static pointers that survive ASLR
  • 🗺️ Memory map, modules, threads
  • 🧱 Allocate & free remote memory (Windows / macOS)

🖥️ The bundled GUI app

  • 🎯 Scanner — every scan mode, ranges, regex/AOB search
  • 🔁 Refine workflow — First Scan → Next Scan…
  • 📋 Cheat table — freeze / write values, JSON import/export
  • 🔗 Pointer scan — export, rescan & compare
  • 🗺️ Memory map with R/W/X flags
  • 🔬 Hex viewer with write-back

📖 Documentation

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 StartOpen a process, read, write and run your first scan.
Searching memoryValue scans, ranges, refining results, the Cheat Engine loop.
Pattern scanFind code/data with byte signatures (AOB) and regex.
PointersMulti-level pointer chains and the live RemotePointer.
Pointer scanFind static pointers that survive ASLR.
The GUI appThe bundled Cheat Engine-style scanner.
API referenceEvery public class, method and parameter.
Platform notesPermissions and quirks on Windows, Linux and macOS.
TroubleshootingCommon errors and how to fix them.

What can I build with this?

  • 🎮 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.


🤝 Contributing

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.


License

Released under the MIT License — free for personal and commercial use.

About

💾 A pure-Python library that lets you inspect, modify and search the memory of any running process in a few lines of Python.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors