Cover art for podcast The Python Podcast.__init__

The Python Podcast.__init__

390 EpisodesProduced by Tobias MaceyWebsite

The podcast about Python and the people who make it great

58:34

Build The Next Generation Of Python Web Applications With FastAPI

Summary

Python has an embarrasment of riches when it comes to web frameworks, each with their own particular strengths. FastAPI is a new entrant that has been quickly gaining popularity as a performant and easy to use toolchain for building RESTful web services. In this episode Sebastián Ramirez shares the story of the frustrations that led him to create a new framework, how he put in the extra effort to make the developer experience as smooth and painless as possible, and how he embraces extensability with lightweight dependency injection and a straightforward plugin interface. If you are starting a new web application today then FastAPI should be at the top of your list.

Announcements
  • Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.
  • When you’re ready to launch your next app or want to try a project you hear about on the show, you’ll need somewhere to deploy it, so take a look at our friends over at Linode. With 200 Gbit/s private networking, node balancers, a 40 Gbit/s public network, fast object storage, and a brand new managed Kubernetes platform, all controlled by a convenient API you’ve got everything you need to scale up. And for your tasks that need fast computation, such as training machine learning models, they’ve got dedicated CPU and GPU instances. Go to pythonpodcast.com/linode to get a $20 credit and launch a new server in under a minute. And don’t forget to thank them for their continued support of this show!
  • Your host as usual is Tobias Macey and today I’m interviewing Sebastián Ramirez about FastAPI, a framework for building production ready APIs in Python 3
Interview
  • Introductions
  • How did you get introduced to Python?
  • Can you start by describing what FastAPI is?
    • What are the main frustrations that you ran into with other frameworks that motivated you to create an entirely new one?
  • What are some of the main use cases that FastAPI is designed for?
  • Many web frameworks focus on managing the end-to-end functionality of a website, including the UI. Why did you focus on just API capabilities?
    • What are the benefits of building an API only framework?
    • If you wanted to integrate a presentation layer, what would be involved in that effort?
  • What API formats does FastAPI support?
    • What would be involved in adding support for additional specifications such as GraphQL or JSON-LD?
  • There are a huge number of web frameworks available just in the Python ecosystem. How does FastAPI fit into that landscape and why might someone choose it over the other options?
  • Can you share your design philosophy for the project?
    • What are your main sources of inspiration for the framework?
    • You have also built the Typer CLI library which you refer to as the little sibling of FastAPI. How have your experiences building these two projects influenced their counterpart’s evolution?
  • What are the benefits of incorporating type annotations into a web framework and in what ways do they manifest in its functionality?
  • What is the workflow for a developer building a complex application in FastAPI?
  • Can you describe how FastAPI itself is architected and how its design has evolved since you first began working on it?
    • What are the extension points that are available for someone to build plugins for FastAPI?
  • What are some of the challenges that you have faced in building an async framework that is leveraging the new ASGI specification?
  • What are some sharp edges that users should keep an eye out for?
  • What are some unique or underutilized features of FastAPI that users might not be aware of?
  • What are some of the most interesting, unexpected, or innovative ways that you have seen FastAPI used?
  • When is FastAPI the wrong choice?
  • What are some of the most interesting, unexpected, or challenging lessons that you have learned in the process of building and maintaining FastAPI?
  • What do you have planned for the future of the project?
Keep In Touch

@tiangolo on Twitter. @tiangolo on GitHub.

Picks Closing Announcements
  • Thank you for listening! Don’t forget to check out our other show, the Data Engineering Podcast for the latest on modern data management.
  • Visit the site to subscribe to the show, sign up for the mailing list, and read the show notes.
  • If you’ve learned something or tried out a project from the show then tell us about it! Email hosts@podcastinit.com) with your story.
  • To help other people find the show please leave a review on iTunes and tell your friends and co-workers
  • Join the community in the new Zulip chat workspace at pythonpodcast.com/chat
Links

The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA

Educational emoji reaction

Educational

Interesting emoji reaction

Interesting

Funny emoji reaction

Funny

Agree emoji reaction

Agree

Love emoji reaction

Love

Wow emoji reaction

Wow

Listen to The Python Podcast.__init__

RadioPublic

A free podcast app for iPhone and Android

  • User-created playlists and collections
  • Download episodes while on WiFi to listen without using mobile data
  • Stream podcast episodes without waiting for a download
  • Queue episodes to create a personal continuous playlist
RadioPublic on iOS and Android
Or by RSS
RSS feed
https://www.pythonpodcast.com/rss

Connect with listeners

Podcasters use the RadioPublic listener relationship platform to build lasting connections with fans

Yes, let's begin connecting
Browser window

Find new listeners

  • A dedicated website for your podcast
  • Web embed players designed to convert visitors to listeners in the RadioPublic apps for iPhone and Android
Clicking mouse cursor

Understand your audience

  • Capture listener activity with affinity scores
  • Measure your promotional campaigns and integrate with Google and Facebook analytics
Graph of increasing value

Engage your fanbase

  • Deliver timely Calls To Action, including email acquistion for your mailing list
  • Share exactly the right moment in an episode via text, email, and social media
Icon of cellphone with money

Make money

  • Tip and transfer funds directly to podcastsers
  • Earn money for qualified plays in the RadioPublic apps with Paid Listens