Skip to main content

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

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:

  1. Fork the repository.

  2. Create a new branch (git checkout -b feature-branch).

  3. Make your changes.

  4. Commit your changes (git commit -am 'Add new feature').

  5. Push to the branch (git push origin feature-branch).

  6. 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

memtab-1.0.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memtab-1.0.0-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file memtab-1.0.0.tar.gz.

File metadata

  • Download URL: memtab-1.0.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for memtab-1.0.0.tar.gz
Algorithm Hash digest
SHA256 03e4e1685bbee93b8db1b985bc8448c0ea9412e7a8738267d09682b3aea8bcf4
MD5 05be8cf1d18b28229d87815380797281
BLAKE2b-256 cbd201997aeb4c6b7d459ebc5e5031a3e9656076a9fefcd5a9052a93006ac400

See more details on using hashes here.

Provenance

The following attestation bundles were made for memtab-1.0.0.tar.gz:

Publisher: publish.yml on etn-corp/memtab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file memtab-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: memtab-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for memtab-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76299777d2d41f52170af6e04e6c9454735c6c8771e174fe2deeed33c3a0c3de
MD5 4ad0aadcf785512671a0875252b11f66
BLAKE2b-256 3550adb037a932ea3509b953cadc6870628f2d576da799a8be76822a3884bc38

See more details on using hashes here.

Provenance

The following attestation bundles were made for memtab-1.0.0-py3-none-any.whl:

Publisher: publish.yml on etn-corp/memtab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page