Python

PyInfra: Because Your Infrastructure Deserves Real Code in Python, Not YAML Soup

UA2.220 (Guillissen)
Loïc Tosser "wowi42"
<p>Remember when we said "Infrastructure as Code"? Somehow, the industry heard "Infrastructure as YAML" and ran with it. Now we're drowning in a sea of indentation-sensitive, template-riddled, Jinja2-abused configuration files that make even the most battle-hardened sysadmins weep into their mechanical keyboards.</p> <p>Enter <strong>PyInfra</strong>—where your infrastructure is <em>actually</em> code. Real Python. With loops that don’t require learning a DSL. With functions that are... wait for it... actual functions. With error handling that doesn’t involve praying to the YAML gods and sacrificing a virgin bracket.</p> <p>In this talk, you’ll see how to: - Write infrastructure automation that your IDE actually understands - Debug with real stack traces instead of <code>"ERROR: The task includes an option with an undefined variable"</code> - Use actual Python conditionals instead of <code>when: ansible_os_family == "Debian" and not (ansible_distribution == "Ubuntu" and ansible_distribution_version is version('20.04', '&gt;='))</code> - Import and reuse code like a civilized developer, not copy-paste playbooks like it’s 1999 - Test your infrastructure code with <code>pytest</code>, not <em>"let’s run it in staging and see what breaks"</em></p> <p>We’ll explore how a typical Ansible playbook can be transformed into clean, maintainable Python with PyInfra, shrinking from 500 lines of YAML to 50 lines of readable code. You’ll discover the joy of list comprehensions over <code>with_items</code>, and the power of deployment logic that can actually <em>think</em>.</p> <p>Stop treating your infrastructure like a configuration file. It’s 2026—your servers deserve better than YAML. They deserve Python.</p> <p><strong>Warning:</strong> This talk may cause uncontrollable urges to refactor all your Ansible playbooks. Side effects include increased productivity, better sleep, and colleagues actually understanding your infrastructure code.</p> <p>Link to the marp: https://marp.kalvad.com/fosdem_2026 (gifs are not working in pdf)</p>

Additional information

Live Stream https://live.fosdem.org/watch/ua2220
Type devroom
Language English

More sessions

1/31/26
Python
Jacob Coffee
UA2.220 (Guillissen)
<p>Discover how PEP 810's explicit lazy imports can dramatically improve Python application startup times. Using a real CLI tool as a case study, that we totally use in our real business, this talk demonstrates practical techniques to optimize import performance while maintaining code clarity and safety.</p>
1/31/26
Python
Ruben Hias
UA2.220 (Guillissen)
<p>Python’s Global Interpreter Lock has shaped the way developers build concurrent applications for nearly three decades. While the GIL simplified the CPython ecosystem, it also imposed well-known limits on CPU-bound work and multithreaded scalability. With the introduction of free-threaded Python (3.14t), that is about to change.</p> <p>This talk explores the history and purpose of the GIL, why it existed for so long, and the innovations that finally made its removal viable. We’ll look at ...
1/31/26
Python
Jarek Potiuk
UA2.220 (Guillissen)
<p>Apache Airflow is the most popular Data Workflow Orchestrator - developed under the Apache Software Foundation umbrella. We have 120+ Python distributions in our rep, and we often release ~ 100 of them every two week. </p> <p>All those distributions are built from a single monorepo. </p> <p><code>[jarekpotiuk:~/code/airflow] find . -name 'pyproject.toml' | wc 120 120 4248</code></p> <p>This had always posed a lot of challenges and we had a lot of tooling to make it possible, however with the ...
1/31/26
Python
Marc-André Lemburg
UA2.220 (Guillissen)
<p><em>Summary:</em></p> <p>ETL stands for "extract, transform, load" and is a synonym for moving data around. This has traditionally often required managing complex systems in the cloud or large data centers. The talk will demonstrate how all this can be greatly simplified by applying modern tools for the task: Python and DuckDB, both open source and readily available to run on most systems - even your notebook.</p> <p><em>Description:</em></p> <p><strong>ETL</strong> stands for "extract, ...
1/31/26
Python
Emma Delescolle
UA2.220 (Guillissen)
<p><a href="https://www.djangoproject.com">Django</a>'s built-in admin is powerful, but it's essentially a separate framework within Django and it's 20 years old.</p> <p>Wouldn't it be nice to be able to work with an admin interface that works like the rest of Django, built on generic CBVs, plugins, and view factories? <a href="https://github.com/jazzband/django-admin2">Django-Admin2</a>, was an attempt at doing just that and it was a fairly successful ptoject.</p> <p>10 years later, after ...
1/31/26
Python
Manuel Raynaud
UA2.220 (Guillissen)
<p>The French digital agency (DINUM) has undertaken to develop an open-source collaborative digital workplace to make the work of public servants simpler and more effective.</p> <p>This collaborative digital workplace is distributed under an open-source license to allow anyone who wishes to take its applications and integrate them into their preferred tools.</p> <p>By participating in existing open-source communities, the digital workplace enables the emergence of digital commons that facilitate ...
1/31/26
Python
Marc-André Lemburg
UA2.220 (Guillissen)
<p>After the success of last year's impromptu lightning talks session, we will have an official one in the Python Devroom for 2026.</p> <p>Please submit your talks using this form:</p> <ul> <li> <p><a href="https://docs.google.com/forms/d/e/1FAIpQLSfh1zpbP6KgMmexQeT6jlcX1_o8W26zovBUVVudxopBMfjGsg/viewform?usp=header">Lightning Talk Submission Form</a></p> </li> <li> <p>The form will be opened for submissions at around 14:00 CET on Saturday, Jan 31, 2026.</p> </li> </ul> <p>Lightning Talks are at ...