Theresa profile picture

Theresa Seyram Agbenyegah

Backend Developer, Social Entrepreneur and Open Source ContributorNone

Theresa Seyram Agbenyegah is a backend software engineer, Python enthusiast, and community builder from Ghana. She specializes in building scalable systems with Python and Django and has a strong passion for open-source development and developer advocacy. Theresa leads programs and events for PyLadies Ghana, organizes meetups for Black Python Devs Ghana, and has served as Programs Lead for PyCon Africa 2024, coordinating conference programming and speaker engagement. She is also a member of the Python Software Foundation Diversity & Inclusion Workgroup and the Django Software Foundation Events Support Working Group, contributing to global efforts to make the Python community more inclusive and collaborative.

Theresa enjoys mentoring developers, organizing technical workshops, and creating opportunities for underrepresented groups to learn and contribute to open-source projects.

Abstract

Async Python and FastAPI: How It Actually Works

"Just use async" is some of the most confidently given and least explained advice in the Python world and industry. Developers are told it improves performance, sprinkle async and await everywhere, and then wonder why their app sometimes gets slower or worse, starts behaving in subtle, hard to debug ways. This talk gives you the model you need to use async Python . We will start with the event loop: what it is, how it schedules work, and why it runs on a single OS thread. We will trace the execution of a simple async function step by step, watching how coroutines suspend and resume. Then we will look at where async genuinely helps — I/O-bound work like database queries, external API calls, and file reads and where it doesn't: CPU-bound work that blocks the event loop and makes everything worse. In the FastAPI and django context, we will look at real world patterns: running async database queries with SQLAlchemy, using httpx for non-blocking HTTP calls to external services, and the right way to run blocking code in a thread pool executor so it doesn't freeze your whole app. We will finish with the most common async mistakes forgotten awaits, mixing sync and async improperly, and accidental blocking and how to catch them before they hit production. Key Takeaways • Understand Python's async model and event loop • Know when async improves performance and when it doesn't • Avoid common async pitfalls in FastAPI

Short Talk Intermediate