Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/woodruffw/procmaps.py
Python bindings for procmaps.rs
https://github.com/woodruffw/procmaps.py
hacktoberfest procfs python rust
Last synced: 14 days ago
JSON representation
Python bindings for procmaps.rs
- Host: GitHub
- URL: https://github.com/woodruffw/procmaps.py
- Owner: woodruffw
- License: mit
- Created: 2020-07-29T00:50:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-07T15:40:45.000Z (about 1 month ago)
- Last Synced: 2024-10-19T12:03:27.300Z (25 days ago)
- Topics: hacktoberfest, procfs, python, rust
- Language: Rust
- Homepage: https://pypi.org/project/procmaps/
- Size: 87.9 KB
- Stars: 35
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
procmaps.py
===========[![CI](https://github.com/woodruffw/procmaps.py/actions/workflows/ci.yml/badge.svg)](https://github.com/woodruffw/procmaps.py/actions/workflows/ci.yml)
[![Downloads](https://pepy.tech/badge/procmaps)](https://pepy.tech/project/procmaps)Python bindings for [procmaps.rs](https://github.com/woodruffw/procmaps.rs).
## Installation
procmaps.py is available for Python 3.7+ via pip:
```bash
$ pip install procmaps
```## Usage
```python
import procmaps# also: from_path, from_str
maps = procmaps.from_pid(9001)
for map_ in maps:
# `in` can be used to check address inclusion
if 0xfeedface in map_:
print("this map contains some address!")# see dict(map_) for all attributes
print(f"{map_.begin_address}: {map_.pathname}")
```## Development
*procmaps.py* uses [PyO3](https://github.com/PyO3/pyo3) for binding Rust
to Python. It uses [Maturin](https://github.com/PyO3/maturin) to coerce the
Rust build into a `pip` and PyPI-compatible wheel.Assuming that you have Rust and a relatively recent Python 3 installed,
the following should just work:```bash
$ make develop
$ source env/bin/activate
```A local build of *procmaps.py* will be created and installed in your virtual environment.