Skip to content

pythonbpf/pylibbpf

Repository files navigation

pylibbpf dark mode

Downloads Build Status License

This library provides Python bindings for libbpf on Linux, making it easier to load eBPF object files. It is designed to be used together with PythonBPF, the eBPF compiler for Python. With these bindings, you can attach eBPF programs to kernel events directly from Python. All programs written with this are to be run with a sudo Python interpreter.

Note: This project is under active development and not ready for production use.

Dependencies

  • A compiler with C++11 support
  • Pip 10+ or CMake >= 4.1
  • Ninja or Pip 10+

Installation

pip install pylibbpf

Development

Clone this repository and pip install. Note the --recursive option which is needed for the pybind11 submodule:

sudo apt install libelf-dev
git clone --recursive https://github.com/varun-r-mallya/pylibbpf.git
pip install .

With the setup.py file included in this example, the pip install command will invoke CMake and build the pybind11 module as specified in CMakeLists.txt.

Building the documentation

The documentation here is still boilerplate.

About

Python Bindings for libbpf

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •