Skip to main content

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!


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.

Python Package Coverage Pypi License Python Version Downloads

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

PyMemoryEditor app attached to a running process

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


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

For 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]"

To let an AI assistant drive the library over the Model Context Protocol, use the mcp extra (see below):

pip install "PyMemoryEditor[mcp]"

📖 Full guide at Read the Docs.


See it in action

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.


Let an AI assistant do it (MCP)

PyMemoryEditor ships a Model Context Protocol server, so an AI assistant can run the whole loop itself:

"Find the health value in my game. It's 100 right now."

It scans, asks you to take damage, refines the matches, and hands you the address.

pip install "PyMemoryEditor[mcp]"
claude mcp add pymemoryeditor -- pymemoryeditor-mcp

Or in any client that reads mcpServers JSON (Claude Desktop, editors, …):

{
  "mcpServers": {
    "pymemoryeditor": {
      "command": "pymemoryeditor-mcp",
      "args": []
    }
  }
}

Fourteen tools cover the full workflow, with scan results kept server-side behind a handle, so a 40 000-hit first scan costs a few tokens instead of your whole context.

Read the MCP guide to learn more.


📖 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.
The MCP serverLet an AI assistant drive the scan/refine loop.
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.

🤝 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.

Metadata

Release files for PyMemoryEditor 3.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyMemoryEditor 3.0.2
File Size Uploaded
pymemoryeditor-3.0.2.tar.gz 1.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyMemoryEditor 3.0.2
File Interpreter ABI Platform
pymemoryeditor-3.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / pymemoryeditor-3.0.2.tar.gz

Download URL pymemoryeditor-3.0.2.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
3968d233db820efb00e794ed0bc2f71920f91b4456247cca8b52d29395bd8acf
BLAKE2b-256 checksum
How to use checksums
c92a61741063779d2c438bbd123994e104b835a5ea1dbd32eadd265dab64c1cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / pymemoryeditor-3.0.2-py3-none-any.whl

Download URL pymemoryeditor-3.0.2-py3-none-any.whl
Size 295.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba90826da54909f763eb8dc4a65f05ba6ea9122dd76c70bceb9448d0e13a5514
BLAKE2b-256 checksum
How to use checksums
195d1fdb9f16434de8769432909b581aac76ab4bbbbb2126d5974d6776256847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.2 This release

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.6.0

2 release files

1.5.24

2 release files

1.5.22

2 release files

1.5.21

2 release files

1.5.20

2 release files

1.5.17

2 release files

1.5.16

2 release files

1.5.15

2 release files

1.5.14

2 release files

1.5.13

2 release files

1.5.12

2 release files

1.5.11

2 release files

1.5.10

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.14

2 release files

1.4.13

1 release file

1.4.12

1 release file

1.4.11

1 release file

1.4.10

1 release file

1.4.9

1 release file

1.4.8

1 release file

1.4.7

1 release file

1.4.6

1 release file

1.4.5

1 release file

1.4.4

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page