PyData NYC 2024

Do Pythons Rust? How we used PyO3 to build a Python Stream Processor with a Rust Heart.
11-07, 15:20–16:00 (US/Eastern), Central Park East

"Python is so slow", "it doesn't scale", "it will hog memory". We've all heard it before. And while sometimes this is true, there are known ways around this and Rust is the newest language on the block making inroads into the Python world for that purpose. In this talk, we're going to explore PyO3 (Sometimes referred to as PyOxide)—a super cool project that lets you bring the speed and safety of Rust into Python with minimal hassle. If you've ever hit a performance wall or if you’ve just been curious about Rust and what it can do, this session is for you. I will share our perspective from building Bytewax with Python and Rust as well as walk through how you can start "Oxidizing" your Python code, making it faster and more efficient, all while keeping the flexibility you love about Python.


In this talk, I will cover how we leverage Rust as the heart of Bytewax, our Python stream processor, through our utilization of PyO3. Bytewax is all about streaming data processing, where there is generally a baseline performance requirement. We've found that Rust gives us the speed and efficiency (to some extent) we need while still letting us work in the Python ecosystem we love.

We'll walk through our experience, showing how we integrate Rust to optimize key parts of our system, and how you can do the same in your own projects. You’ll learn how to set up your environment, write Rust code that plays nicely with Python, and use PyO3 and Maturin to package it all up. By the end, you'll see how Rusty a Python can truly get. Whether you’re looking to boost performance or simply curious about Rust, this session will give you a practical, real-world look at how these two languages can work together.


Prior Knowledge Expected

No previous knowledge expected

Zander has a varied data background from data science to data and machine learning infrastructure. He founded and currently heads a startup the develops and maintains the open source project, Bytewax. He has worked in the data space since 2014 at Heroku, GitHub, and an NLP startup.