Skip to main content

Python Bindings for Libbpf

Project description

Py-libbpf

This library provides Python bindings for libbpf on Linux to make loading of eBPF object files easier. This is meant to be used along with `pythonbpf`, the eBPF Python DSL compiler. This library makes it possible to attach these programs to events in the kernel right from inside Python.

IN DEVELOPMENT. DO NOT USE.

Prerequisites

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

Installation

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

Development

Do this before running to make sure Python can manipulate bpf programs without sudo

sudo setcap cap_bpf,cap_sys_admin+ep /usr/bin/python3.12

Building the documentation

The documentation here is still boilerplate.

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

pylibbpf-0.0.5.tar.gz (2.7 MB view details)

Uploaded Source

Built Distributions

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

pylibbpf-0.0.5-cp311-cp311-manylinux_2_28_x86_64.whl (727.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pylibbpf-0.0.5-cp38-cp38-manylinux_2_28_x86_64.whl (725.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

File details

Details for the file pylibbpf-0.0.5.tar.gz.

File metadata

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

File hashes

Hashes for pylibbpf-0.0.5.tar.gz
Algorithm Hash digest
SHA256 d334959a9af4dd46efcaff3b278e1e89c7315497e4752365652c4bf11d5a43a8
MD5 4438d0479db15593a02c66a487f06ca5
BLAKE2b-256 97b38d3e9acf3297c8323614e1c9974e76d34766874016a0633d718272203fb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylibbpf-0.0.5.tar.gz:

Publisher: wheels.yml on varun-r-mallya/pylibbpf

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

File details

Details for the file pylibbpf-0.0.5-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylibbpf-0.0.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5f20006ad72fdd7dd34baf8dbb20187f211310eb6f5d21720ac75b7309a4140e
MD5 05ca1c6cc1bf99a3298a618b3c003bec
BLAKE2b-256 b6c2a39f60b7401916fdf737fb80706b3b3ea935bc21da67a2f970a77735624a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylibbpf-0.0.5-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on varun-r-mallya/pylibbpf

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

File details

Details for the file pylibbpf-0.0.5-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylibbpf-0.0.5-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 edb6ebf7ae5e0987939feff40aad781709f205b7f0e429cdcd244e1525b23506
MD5 eb4bbfca9c94f877e4ae1a53707fefe7
BLAKE2b-256 4f388156d0d4d88e18b2fb3dabcabdd9876f380ae8d5dc22720af2ad1dd413f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylibbpf-0.0.5-cp38-cp38-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on varun-r-mallya/pylibbpf

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