Skip to content

Commit 7ada8c1

Browse files
committed
update readme example and move above build steps
1 parent 33bb394 commit 7ada8c1

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,6 @@
77
1. Install python package: `pip install memflow`
88
2. Install appropriate memflow components (see [memflowup]).
99

10-
## Building from source
11-
12-
### Prerequisites
13-
14-
- Rust ([Compilation support](https://github.com/memflow/memflow#compilation-support))
15-
- Python (3.7 and up)
16-
17-
### Advisory warning
18-
19-
It is advised to build in a [python virtual environment](https://docs.python.org/3/tutorial/venv.html), so that you do not accidentally break anything that depends on this package.
20-
21-
### Steps
22-
23-
1. Fetch repository: `git clone https://github.com/memflow/memflow-py`
24-
2. Install maturin package: `pip install maturin`
25-
3. Install dev packages: `pip install '.[dev]'`
26-
4. Build wheels and install package: `maturin develop`
27-
5. Repeat step 4 when you make changes to source.
28-
6. Test your changes: `python -m pytest`
29-
30-
For more information on building please see [Maturin].
31-
3210
## Example
3311

3412
```py
@@ -46,13 +24,35 @@ class COFFHeader(Structure):
4624
return f"{self.sections}, {self.timestamp}"
4725

4826
inventory = Inventory()
49-
os = inventory.os("native")
27+
os = inventory.create_os("native")
5028
process = os.process_from_name("CalculatorApp.exe")
51-
module = process.module_from_name("CalculatorApp.dll")
29+
module = process.module_by_name("CalculatorApp.dll")
5230
header = process.read(module.base + 0x40, COFFHeader)
5331
print(header)
5432
```
5533

34+
## Building from source
35+
36+
### Prerequisites
37+
38+
- Rust ([Compilation support](https://github.com/memflow/memflow#compilation-support))
39+
- Python (3.7 and up)
40+
41+
### Advisory warning
42+
43+
It is advised to build in a [python virtual environment](https://docs.python.org/3/tutorial/venv.html), so that you do not accidentally break anything that depends on this package.
44+
45+
### Steps
46+
47+
1. Fetch repository: `git clone https://github.com/memflow/memflow-py`
48+
2. Install maturin package: `pip install maturin`
49+
3. Install dev packages: `pip install '.[dev]'`
50+
4. Build wheels and install package: `maturin develop`
51+
5. Repeat step 4 when you make changes to source.
52+
6. Test your changes: `python -m pytest`
53+
54+
For more information on building please see [Maturin].
55+
5656
[Memflow]: https://github.com/memflow/memflow
5757
[memflowup]: https://github.com/memflow/memflowup
5858
[Rust]: https://rust-lang.org/

0 commit comments

Comments
 (0)