PyMemoryEditor

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.

Runs on 🪟 Windows · 🐧 Linux · 🍎 macOS — 32-bit and 64-bit.

Python Package Pypi License Python Version Downloads

Welcome to PyMemoryEditor’s documentation. PyMemoryEditor is a pure-Python library — built on ctypes — that lets you inspect, modify and search the memory of any running process: your own scripts, a game, a debugger target, anything. It brings the operations Cheat Engine made famous (value scans, pattern scans, pointer chains, pointer scans, freezing values) to a small, friendly API that works identically on Windows, Linux and macOS.

Get going with the Installation and Quick Start pages, then dig into the User Guide for the in-depth walkthroughs. Prefer to click rather than type? The bundled GUI app gives you a Cheat Engine-style interface for free.

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, 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)

Enjoying PyMemoryEditor?

If the library saved you time, please ⭐ star it on GitHub — it’s the single easiest way to support the project and help others discover it.

Why PyMemoryEditor?

🌍 Truly cross-platform

One identical API on Windows, Linux and macOS, 32- and 64-bit. Write your script once; it runs everywhere.

🪶 Zero dependencies

Pure Python on top of ctypes — no C compiler, no native build step, no wheels to chase.

🔎 The full Cheat Engine toolkit

Value scans with eight comparison modes, AOB / regex pattern scans, and the classic first scan → refine loop.

🔗 Pointers that survive restarts

A reverse pointer scan finds the static module + offsets chains that beat ASLR — save them once and reuse them every launch.

⚡ Optional NumPy acceleration

Add the speed extra and selective scans get 10–60× faster — a drop-in fast path, identical results.

🖥️ A GUI app, included

No code required: the bundled Cheat Engine-style app lets anyone explore, scan and freeze values by clicking.

User’s Guide

This part of the documentation walks you through every workflow, from opening a process to following multi-level pointer chains, plus the bundled GUI app.

API Reference

If you are looking for information on a specific class, method or parameter, this part of the documentation is for you.

Additional Notes

Platform-specific behaviour, troubleshooting, logging, a glossary of the terms used throughout these docs, plus how to contribute and the project’s license.