ELF File Memory Tabulator
Project description
memtab is a Python-based project that provides both a command line interface (CLI) and a Python library. It is designed to produce both machine and human-readable reports from binary files in the ELF (Executable and Linkable Format) format.
For more information on the ELF file format, please refer to the Wikipedia article on ELF.
Features
Command Line Interface (CLI)
Python library
Generates machine-readable reports
Generates human-readable reports
Installation
To install memtab, you can use pip:
pip install memtab
You can also install it directly from git if desired:
pip install git+https://github.com/etn-corp/memtab.git
Usage
Command Line Interface
To use the CLI, run:
memtab --elf <path-to-elf-file> --config <path-to-yml-file>
Python Library
To use the Python library:
import memtab
tabulator = Memtab(elf_file, [config])
report = tabulator.tabulate()
print(report) # this is a pandas dataframe at this point
GitHub Action
To use this as a GitHub Action:
- name: Memtab
uses: etn-corp/memtab@main
with:
sdk_path: [YOUR_SDK_HERE]
elf: ${{ github.workspace }}\source\build\zephyr\zephyr.elf
The action will generate the markdown output (using the –md argument) and upload that markdown as a step summary.
Developing
This project is managed using uv. For more information, refer to Astral’s page on uv.
Common Commands
uv sync: Sync your development environment with the project dependencies.
uv run <command>: Run a command within the project’s virtual environment.
uv build: generate a pip installable wheel or sdist file in the dist/ directory.
Running Tests
To run tests, use uv with coverage:
uv run coverage run -m pytest
Pre-commit Hooks
We use pre-commit to ensure code quality and consistency. After cloning the project, install the pre-commit hooks by running:
pre-commit install
For more information on pre-commit, visit the pre-commit website.
We also have a GitHub Action that runs pre-commit checks on every push and pull request, so you can rely on that if you prefer not to install pre-commit locally.
Contribution Guidelines
We welcome contributions! Please follow these guidelines:
Fork the repository.
Create a new branch (git checkout -b feature-branch).
Make your changes.
Commit your changes (git commit -am 'Add new feature').
Push to the branch (git push origin feature-branch).
Create a new Pull Request.
Reporting Issues
If you encounter any issues, please report them on the GitHub Issues page.
Generating Documentation
To generate documentation, use Sphinx:
sphinx-build docs docs/_build/html
Or, if you have poe installed, you can run:
poe docs
License
This project is licensed under the MIT License. See the LICENSE file for more information.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memtab-1.0.8.tar.gz.
File metadata
- Download URL: memtab-1.0.8.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35a5cda8672211d28c7ac8adf895e8bc0f24adaeea170fd362c1a3f66f10652b
|
|
| MD5 |
8aa4cbafac4926010955020959bcaf12
|
|
| BLAKE2b-256 |
7bbd3624c21c6c0b6ab7e1832eb31d9d7f4166940f2928e5f235a79e6954e926
|
Provenance
The following attestation bundles were made for memtab-1.0.8.tar.gz:
Publisher:
publish.yml on etn-corp/memtab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memtab-1.0.8.tar.gz -
Subject digest:
35a5cda8672211d28c7ac8adf895e8bc0f24adaeea170fd362c1a3f66f10652b - Sigstore transparency entry: 1703840680
- Sigstore integration time:
-
Permalink:
etn-corp/memtab@75e7da976b1c4508a11a8b32ef3afb119944af39 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/etn-corp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@75e7da976b1c4508a11a8b32ef3afb119944af39 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file memtab-1.0.8-py3-none-any.whl.
File metadata
- Download URL: memtab-1.0.8-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07f55bfdc36255effed092ac5261d8c713155c7ce64be4beb876a622ed80e21c
|
|
| MD5 |
db82d28de0b02f76046b8792cebfb82c
|
|
| BLAKE2b-256 |
a42ae9cb8d076f476b9b631483c695df95bb37b533e1f761a831681f67b84820
|
Provenance
The following attestation bundles were made for memtab-1.0.8-py3-none-any.whl:
Publisher:
publish.yml on etn-corp/memtab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memtab-1.0.8-py3-none-any.whl -
Subject digest:
07f55bfdc36255effed092ac5261d8c713155c7ce64be4beb876a622ed80e21c - Sigstore transparency entry: 1703840797
- Sigstore integration time:
-
Permalink:
etn-corp/memtab@75e7da976b1c4508a11a8b32ef3afb119944af39 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/etn-corp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@75e7da976b1c4508a11a8b32ef3afb119944af39 -
Trigger Event:
workflow_run
-
Statement type: