Skip to content

Commit fb9807a

Browse files
committed
update readme
1 parent cee7c37 commit fb9807a

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
# memobj
22

3-
A library for defining objects in memory
3+
A Python library for defining and reading structured objects directly from another process's memory.
44

5-
## installing
5+
## Installation
66

7-
`pip install memobj`
7+
- Using pip:
8+
- pip install memobj
9+
- Using uv:
10+
- uv add memobj
811

9-
## example
12+
## Quickstart
1013

1114
```python
1215
import os
13-
1416
from memobj import WindowsProcess, MemoryObject
1517
from memobj.property import Signed4
1618

17-
1819
class PythonIntObject(MemoryObject):
1920
# note: this offset might be different in future python versions
2021
value: int = Signed4(24)
2122

22-
2323
process = WindowsProcess.from_id(os.getpid())
2424

2525
# id(x) gives the address of the object in cpython
@@ -29,6 +29,22 @@ my_int = PythonIntObject(address=id(1), process=process)
2929
print(my_int.value)
3030
```
3131

32-
## support
32+
See tests for more examples (pointer properties, process/module utilities, etc.).
33+
34+
## Development setup
35+
36+
This project uses uv as the build backend and package manager.
37+
38+
- Sync dependencies (including the tests group):
39+
- uv sync --all-groups
40+
- Run tests:
41+
- uv run pytest
42+
- Format code:
43+
- isort . && black .
44+
45+
Optional: A Nix flake provides a dev shell with Python 3.11, just, black, isort, and more:
46+
- nix develop
47+
48+
## Support
3349

34-
discord: <https://discord.gg/wcftyYm6qe>
50+
discord: https://discord.gg/wcftyYm6qe

memobj/property/pointer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def to_memory_deref(self, value: Any):
138138

139139
for attribute_name in self._pointed_type.__memory_properties__.keys():
140140
setattr(
141-
self._pointed_type, attribute_name, getattr(value, attribute_name)
141+
instance, attribute_name, getattr(value, attribute_name)
142142
)
143143

144144
elif isinstance(self._pointed_type, str):

0 commit comments

Comments
 (0)