Skip to content

Commit

Permalink
Update LIEF Python package README
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Aug 18, 2024
1 parent de60b62 commit b267a99
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 3 deletions.
64 changes: 64 additions & 0 deletions api/python/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
About
=====

The purpose of this project is to provide a cross platform library that can parse, modify and
abstract ELF, PE and MachO formats.

Main features:

* **Parsing**: LIEF can parse ELF, PE, MachO, OAT, DEX, VDEX, ART and provides an user-friendly API to access to format internals.
* **Modify**: LIEF enables to modify some parts of these formats
* **Abstract**: Three formats have common features like sections, symbols, entry point... LIEF factors them.
* **API**: LIEF can be used in C, C++, Python and Rust

LIEF Extended:

* DWARF/PDB Support
* Objective-C Metadata

Checkout: https://lief.re/doc/latest/extended/intro.html for the details

Getting Started
================

.. code-block:: console
$ pip install lief
.. code-block:: python
import lief
elf = lief.ELF.parse("/bin/ls")
for section in elf.sections:
print(section.name, len(section.content))
pe = lief.PE.parse("cmd.exe")
for imp in pe.imports:
print(imp.name)
fat = lief.MachO.parse("/bin/dyld")
for macho in fat:
for sym in macho.symbols:
print(sym)
Documentation
=============

* `Main documentation <https://lief.re/doc/latest/index.html>`_
* `API <https://lief.re/doc/latest/api/python/index.html>`_

Contact
=======

* **Mail**: contact at lief.re
* **Discord**: `LIEF <https://discord.com/invite/7hRFGWYedu>`_

Authors
=======

Romain Thomas `@rh0main <https://x.com/rh0main>`_

----

LIEF is provided under the `Apache 2.0 license <https://github.com/lief-project/LIEF/blob/0.15.1/LICENSE>`_
5 changes: 2 additions & 3 deletions api/python/backend/dynamic_provider.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations
from pathlib import Path
from setup import ROOT_DIR
from setup import BINDING_DIR
from versioning import Versioning
from scikit_build_core.settings.skbuild_read_settings import rich_print

Expand All @@ -11,4 +10,4 @@ def dynamic_metadata(field, config) -> str:
return version

if field == "readme":
return (ROOT_DIR / "package" / "README.rst").as_posix()
return (BINDING_DIR / "README.rst").as_posix()

0 comments on commit b267a99

Please sign in to comment.