{"id":15912403,"url":"https://github.com/jeanextreme002/pymemoryeditor","last_synced_at":"2026-01-31T10:32:50.193Z","repository":{"id":54013758,"uuid":"342048676","full_name":"JeanExtreme002/PyMemoryEditor","owner":"JeanExtreme002","description":":floppy_disk: Multi-platform library developed with ctypes for reading, writing and searching process memory, in a simple and friendly way with Python 3. The package supports Windows and Linux (32-bit and 64-bit).","archived":false,"fork":false,"pushed_at":"2024-10-04T08:16:38.000Z","size":162,"stargazers_count":61,"open_issues_count":5,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-27T01:17:39.260Z","etag":null,"topics":["address","cheat","cheat-engine","ctypes","debug","editor","memory","memory-editor","memory-scanner","process","python","python-library","python3","readprocessmemory","scanning","tracking","win32","win32api","winapi","writeprocessmemory"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/PyMemoryEditor/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JeanExtreme002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-24T22:06:16.000Z","updated_at":"2025-05-01T11:20:49.000Z","dependencies_parsed_at":"2022-08-13T06:01:00.518Z","dependency_job_id":"c8d5aeef-c527-42c8-81b6-775490b5bd73","html_url":"https://github.com/JeanExtreme002/PyMemoryEditor","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.4375,"last_synced_commit":"3bda73c41a10437e845e2c406537b324020019f0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeanExtreme002%2FPyMemoryEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeanExtreme002%2FPyMemoryEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeanExtreme002%2FPyMemoryEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeanExtreme002%2FPyMemoryEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JeanExtreme002","download_url":"https://codeload.github.com/JeanExtreme002/PyMemoryEditor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeanExtreme002%2FPyMemoryEditor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259146589,"owners_count":22812273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["address","cheat","cheat-engine","ctypes","debug","editor","memory","memory-editor","memory-scanner","process","python","python-library","python3","readprocessmemory","scanning","tracking","win32","win32api","winapi","writeprocessmemory"],"created_at":"2024-10-06T16:04:35.261Z","updated_at":"2026-01-31T10:32:50.181Z","avatar_url":"https://github.com/JeanExtreme002.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyMemoryEditor\nA Python library developed with [ctypes](https://docs.python.org/3/library/ctypes.html) to manipulate Windows and Linux processes (32 bits and 64 bits), \u003cbr\u003e\nreading, writing and searching values in the process memory.\n\n[![Python Package](https://github.com/JeanExtreme002/PyMemoryEditor/actions/workflows/python-package.yml/badge.svg)](https://github.com/JeanExtreme002/PyMemoryEditor/actions/workflows/python-package.yml)\n[![Pypi](https://img.shields.io/pypi/v/PyMemoryEditor)](https://pypi.org/project/PyMemoryEditor/)\n[![License](https://img.shields.io/pypi/l/PyMemoryEditor)](https://pypi.org/project/PyMemoryEditor/)\n[![Platforms](https://img.shields.io/badge/platforms-Windows%20%7C%20Linux-8A2BE2)](https://pypi.org/project/PyMemoryEditor/)\n[![Python Version](https://img.shields.io/badge/python-3.6%20%7C...%7C%203.11%20%7C%203.12-blue)](https://pypi.org/project/PyMemoryEditor/)\n[![Downloads](https://static.pepy.tech/personalized-badge/pymemoryeditor?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=orange\u0026left_text=Downloads)](https://pypi.org/project/PyMemoryEditor/)\n\n# Installing PyMemoryEditor:\n```\npip install PyMemoryEditor\n```\n\n### Tkinter application sample:\nType `pymemoryeditor` at the CLI to run a tkinter app — similar to the [Cheat Engine](https://en.wikipedia.org/wiki/Cheat_Engine) — to scan a process.\n\n# Basic Usage:\nImport `PyMemoryEditor` and open a process using the `OpenProcess` class, passing a window title, process name \u003cbr\u003e\nor PID as an argument. You can use the context manager for doing it.\n```py\nfrom PyMemoryEditor import OpenProcess\n\nwith OpenProcess(process_name = \"example.exe\") as process:\n    # Do something...\n```\n\nAfter that, use the methods `read_process_memory` and `write_process_memory` to manipulate the process \u003cbr\u003e\nmemory, passing in the function call the memory address, data type and its size. See the example below:\n```py\nfrom PyMemoryEditor import OpenProcess\n\ntitle = \"Window title of an example program\"\naddress = 0x0005000C\n\nwith OpenProcess(window_title = title) as process:\n\n    # Getting value from the process memory.\n    value = process.read_process_memory(address, int, 4)\n\n    # Writing to the process memory.\n    process.write_process_memory(address, int, 4, value + 7)\n```\n\n# Getting memory addresses by a target value:\nYou can look up a value in memory and get the address of all matches, like this:\n```py\nfor address in process.search_by_value(int, 4, target_value):\n    print(\"Found address:\", address)\n```\n\n## Choosing the comparison method used for scanning:\nThere are many options to scan the memory. Check all available options in [`ScanTypesEnum`](https://github.com/JeanExtreme002/PyMemoryEditor/blob/master/PyMemoryEditor/win32/enums/scan_types.py).\n\nThe default option is `EXACT_VALUE`, but you can change it at `scan_type` parameter:\n```py\nfor address in process.search_by_value(int, 4, target_value, scan_type = ScanTypesEnum.BIGGER_THAN):\n    print(\"Found address:\", address)\n```\n\nYou can also search for a value within a range:\n```py\nfor address in process.search_by_value_between(int, 4, min_value, max_value, ...):\n    print(\"Found address:\", address)\n```\n\nAll methods described above work even for strings, including the method `search_by_value_between` — however, `bytes` comparison may work differently than `str` comparison, depending on the `byteorder` of your system.\n\n## Progress information on searching:\nThese methods has the `progress_information` parameter that returns a dictionary containing the search progress information.\n```py\nfor address, info in process.search_by_value(..., progress_information = True):\n    template = \"Address: 0x{:\u003c10X} | Progress: {:.1f}%\"\n    progress = info[\"progress\"] * 100\n    \n    print(template.format(address, progress))\n```\n\n# Reading multiple addresses efficiently:\nIf you have a large number of addresses where their values need to be read from memory, using the `search_by_addresses` method is much more efficient than reading the value of each address one by one.\n```py\nfor address, value in process.search_by_addresses(int, 4, addresses_list):\n    print(f\"Address\", address, \"holds the value\", value)\n```\nThe key advantage of this method is that it reads a memory page just once, obtaining the values of the addresses within the page. This approach reduces the frequency of system calls.\n\n## Getting memory regions:\nUse the method `get_memory_regions()` to get the base address, size and more information of all memory regions used by the process.\n\n```py\nfor memory_region in process.get_memory_regions():\n    base_address = memory_region[\"address\"]\n    size = memory_region[\"size\"]\n    information = memory_region[\"struct\"]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeanextreme002%2Fpymemoryeditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeanextreme002%2Fpymemoryeditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeanextreme002%2Fpymemoryeditor/lists"}