Skip to Main Content
Talk Intermediate CC BY-SA 4.0

PythonBPF - now with loops, custom funcs, and more maps!

Proposal status is Approved
Session Description

PythonBPF is a project that enables developers to write eBPF programs in pure Python, essentially allowing you to write code that runs inside your kernel in Python.

We allow a reduced Python grammar to be used for the eBPF-specific parts of code. This allows users to:

  1. Write both eBPF logic and user-space code in Python (and can be in the same file), so the Python dev-tools apply to the whole file instead of just the non-BPF parts.
  2. Process eBPF data and visualize it using Python's ecosystem, and interactively develop and debug eBPF programs using Python notebooks.
  3. Allows quick prototyping of BPF programs, and has a familiar and easy-to-learn syntax.

Feel free to go through the project's README to get an overview of how this is done.

Our goal with this session is to explain how some parts of PythonBPF work, as well as gain insight into what new features that people who might use PythonBPF need.

We’ll briefly discuss what PythonBPF is (for the uninitiated), how it overcomes the shortcomings of other ways of writing eBPF code, and what’s new in PythonBPF since it was last demoed at FOSDEM - loops, custom functions, a better type deduction system and support for more helpers

Key Takeaways
  1. An overview of eBPF
  2. Why PythonBPF is needed.
  3. New features we recently added to PythonBPF and why you might want to try it out
  4. A request for community help in development

References

Session Categories

Introducing a FOSS project or a new version of a popular project
Talk License: CC BY-SA 4.0

Which track are you applying for?

Compilers, Programming Languages and Systems

Speakers

Pragyansh Chaturvedi Software Engineer | Canonical

Pragyansh is a Software Engineer at Canonical, where he works on maintaining Ubuntu for Raspberry Pi and ARM computers. He is also a Post-Baccalaureate Fellow at FPLaunchpad. He is the co-creator and maintainer of PythonBPF, and is an Ubuntu MOTU.

Pragyansh Chaturvedi
https://www.linkedin.com/in/r41k0u/
Varun Mallya Student | IIT Roorkee

Varun Mallya is a student at IIT Roorkee. He is the co-creator and maintainer of PythonBPF. He also contributes to the BPF subsystem of the Linux Kernel.

Varun Mallya
https://www.linkedin.com/in/varun-r-mallya/