List of videos

Talks - Bruce Eckel: Functional Error Handling
In the early days, people wrote small applications in assembly language, using gotos to get around. This didn't scale, so we traded gotos for structured functions with single entry and exit points—and then we added a new kind of goto with the exception, which not only blows up your function but can end up anywhere. This makes functions difficult to compose. We’ll look at strategies in Python that bring exceptions under control and make functions composable again, including the third-party returns library. Slides: https://pycon-assets.s3.amazonaws.com/2024/media/presentation_slides/23/2024-05-17T15%3A22%3A34.929452/Slides.pdf
Watch
Talks - Sebastian Buczyński: Having fun with pydantic and pattern matching
Pattern matching has been with us since Python3.10. Since the introduction of the match-case statement, we've got a powerful and elegant tool to control the flow of the program. This talk is to showcase a real-world scenario of handling different messages coming from a broker, using match-case and Pydantic. Slides: https://pycon-assets.s3.amazonaws.com/2024/media/presentation_slides/66/2024-05-17T11%3A17%3A21.890073/pattern_matching_pyconus2024.pptx
Watch
Talks - David Hewitt: How Python Harnesses Rust through PyO3
The last few years have seen Rust burst onto the scene as a language for implementing much-loved software for the Python ecosystem. The most well known examples of these are pydantic, polars, cryptography, and ruff. These Rust components are usually built on top of PyO3, a Rust library for binding the two languages together, and maturin, a PEP517 build backend for Rust software. There are a growing number of talks, blogs, and guides showing how to use these tools. In this talk I'll lead you through the details of how a Python function call ends up executing Rust code via PyO3. We'll first spend some time introducing some key ideas as well as the benefits of adding Rust to your Python stack. I'll then break down step-by-step what happens inside the Python interpreter and PyO3's internals as a seemingly simple enough Python expression leads to execution of your Rust function. You should walk away from this talk with an idea of how Rust/PyO3 software works under the hood. These same stages of a "native" function call are similar for multiple other languages too, including Python standard library "builtins", Cython code, and C++/pybind11 software, so this may bring you some useful insight even if Rust is not planned to be in your software stack soon. While this talk will get technical, no knowledge of Rust will be assumed. An understanding of Python functions and types will be useful, as I'll use these to introduce the analogous Rust concepts. Expect to see Rust code (and maybe a little C), but only for illustration - all code will be broken down and stepped through. Slides: https://pycon-assets.s3.amazonaws.com/2024/media/presentation_slides/89/2024-05-18T11%3A49%3A35.866887/How_Python_Harnesses_Rust_through_PyO3_nN7MfDq.pdf
Watch
Talks - James Schmitz: Creative Coding with py5, the Python version of Processing
py5 is a framework for doing creative coding in Python that is very similar to the widely used Java framework Processing. The goal of this talk is to introduce py5 to the Python community and demonstrate how it can be used for data visualization, art, and education. It is accessible to beginners while also being capable of supporting professional artists creating digital art that is shown in galleries. By design, py5 is integrated into the Python ecosystem, working well with popular Python libraries such as numpy, matplotlib, PIL, shapely, and trimesh. Slides: https://pycon-assets.s3.amazonaws.com/2024/media/presentation_slides/167/2024-05-18T05%3A49%3A20.883215/Creative_Coding_with_py5.pdf
Watch
Talks - Arthur Pastel: Demystifying AsyncIO: Building Your Own Event Loop in Python
AsyncIO has emerged as a vital tool in Python's ecosystem, particularly in web development, IO-bound tasks, and network programming. However, its internal mechanics often remain obscure, even to seasoned Python developers. This talk aims to demystify AsyncIO by guiding you through creating your own event loop in Python, culminating in running a FastAPI application with it. In this talk, we’ll build an event loop from scratch in Python, capable of running an HTTP server through a FastAPI application. Plan: Introduction to AsyncIO Core Concepts: Deep dive into Event loop, Futures, Tasks, and coroutines Hands-On Building: Constructing an event loop from scratch Scheduling callbacks Executing tasks and coroutines Handling network calls Practical Application: Running a FastAPI HTTP server with our loop Performance Insights: Comparing our event loop with the fastest ones By the end of this talk, you'll be able to understand the internal workings of AsyncIO and create a basic event loop capable of running a FastAPI application.
Watch
Talks - Alla Barbalat: AI, IP, and Your Code: What Developers Need to Know
In a world where AI-generated code is becoming more prevalent, who owns the output? Can AI companies freely use your open-source code as training data? What are the legal ramifications when an AI system infringes upon existing intellectual property rights? Alla will address these critical questions focused on code and IP law. The talk aims to demystify the complex legal landscape developers may find themselves navigating when using AI-generated code. Slides: https://pycon-assets.s3.amazonaws.com/2024/media/presentation_slides/7/2024-05-19T01%3A17%3A12.782205/IP_and_AI-generated_Code_V2.key
Watch
Talks - Saksham Sharma: A low latency deepdive of Python with Cython
When someone finds Python slow, Cython is a popular choice to speed it up. But how slow is any given thing you’re doing? How much faster is Cython? 100X of what? In this talk, we will write some python data analysis code in Cython, read some parts of its generated code to understand what all Python has to do to run it, and understand how long different things take by running microbenchmarks. We will then see how simple hints to Cython can help it generate faster code, and see how fast it gets. This talk is intended for Python users writing performance sensitive applications, who are at least mildly familiar with Cython and/or C/C++. Attendees will learn how to profile and optimize common operations, which should help them to evaluate Cython or Python for their use-case. Slides: https://pycon-assets.s3.amazonaws.com/2024/media/presentation_slides/36/2024-05-19T15%3A05%3A14.536266/v3.pdf
Watch
Talks - Antonio Cuni: SPy (Static Python) lang: fast as C, Pythonic as Python
SPy is a brand new statically typed variant of Python which aim to get performance comparable to system languages such as C and C++, while preserving the "Pythonic feeling" of the language. The main idea behind SPy is that "modern Python" is actually a subset of Python: many of the most dynamic features of the language are considered bad practice and actively discouraged; the alway-increasingly adoption of typing leads to codebases which are largerly statically typed. However, these rules are not enforced by the language, and there are cases in which "breaking the rules" is actually useful and make the code easier/better/faster. From the point of view of language implementors, the VM cannot easily take advantage of the "mostly static" nature of programs because it has always to be ready for the generic case. SPy tries to reconcile these two sides: it uses a static type system which is designed specifically for safety and performance; the vast majority of "dynamic" feature of Python (like decorators, metaclasses, __special_methods__, ...) can be used at zero cost, since they are resolved at compile time by using meta-programming and partial evaluation techniques. This talk will present in the details the ideas behind SPy and its current status.
Watch
Talks - Michael Droettboom: Measuring the performance of CPython
Over the last few years, improving performance has been one of the main areas of focus for CPython. This talk focuses on how CPython's performance is measured, and what it means when we say that one version is X% faster than another. Many of these techniques apply in general to all kinds of software. This includes: A history of performance measurement in Python, and how measuring an interpreter can be different from other kinds of software. An overview of CPython's pyperformance benchmark suite, and what makes a benchmark more or less useful. Why is the concept of the "typical Python workload" so elusive? An evaluation of the breadth of the benchmark suite and a discussion of ways in which the Python community can help to improve it. Why measuring time is hard, and how we improve that situation with software, hardware, and statistics. An overview of our continuous benchmarking system, based on Github Actions. Lastly, a discussion of how these techniques can be applied to software in general.
Watch