Skip to content

JeanExtreme002/PyMemoryEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

204 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

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.

Runs on ๐ŸชŸ Windows ยท ๐Ÿง Linux ยท ๐ŸŽ macOS โ€” 32-bit and 64-bit.

Python Package Pypi License Python Version Downloads

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

๐Ÿ“– 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.


What's inside

๐Ÿ The Python library

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 RemotePointer handle
  • ๐Ÿงญ Pointer scan โ€” find static pointers that survive ASLR
  • ๐Ÿ—บ๏ธ Memory map, modules, threads
  • ๐Ÿงฑ Allocate & free remote memory (Windows / macOS)

๐Ÿ–ฅ๏ธ The bundled GUI app

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

๐Ÿ“– 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

Sponsor this project

 

Packages

 
 
 

Contributors