State of Flask and Pallets in 2024
With this episode, I hope you’re ready for an inside look at the latest happenings in Flask, one of Python’s most popular web frameworks. David Lord, Flask’s lead maintainer, takes us behind the scenes of recent performance boosts (like a 50% speedup in Werkzeug), the future of async support via Quart, and how the broader Pallets ecosystem is evolving under one umbrella. You’ll also hear about Pallets Eco, which aims to streamline and revive critical Flask extensions, and learn how you can contribute to this massive open-source effort. If you use Flask, want to keep your Python apps on the cutting edge, or just love data-driven insights from top maintainers, this episode is for you.
Flask and its sister libraries are faster, leaner, and more maintainable than ever. The pallets-eco initiative aims to keep the Flask extension ecosystem thriving. David and the Pallets team welcome new contributors, especially folks interested in type annotations, extension maintenance, or community support. Check out the Pallets Discord to get involved!
Episode Deep Dive
Guests introduction and background
David Lord is the lead maintainer of Flask, part of the Pallets open-source organization. Over the past several years, he has overseen core improvements to Flask and other critical libraries in the Pallets ecosystem (Werkzeug, Jinja, Click, and more). David also helps coordinate contributors, manage new releases, and foster community around these widely used projects. In this episode, he shares the latest on Flask and where Pallets is heading in 2024.
What to Know If You're New to Python
If you’re just getting started with Python and want to follow along:
- Flask is a "micro" web framework in Python, meaning it focuses on the essentials for web development and leaves room for extensions.
- You’ll hear about package management tools like
pip
andpip-tools
; knowing basic dependency management is helpful. - GitHub workflows and continuous integration (CI) are relevant for version management and publishing code, but you only need a cursory understanding to appreciate the episode.
Key points and takeaways
- The Performance Boost in Flask’s Core (Werkzeug) Flask’s underlying library, Werkzeug, underwent significant refactoring to remove Python 2/3 bridging code and cut down on redundant string/byte checks. The result is up to a 50% speed increase for request–response cycles. This boosts performance for every Flask app, large or small.
- Pallets Eco: Reviving the Flask Ecosystem With many popular extensions and libraries stagnating, Pallets Eco is a new initiative to unify and rejuvenate Flask’s extensive add-on ecosystem. It offers a central place on GitHub for community-driven maintenance and consistent tooling across various Flask extensions such as Flask-Admin, Flask-Security, and more.
- Links and Tools:
- Pallets Eco on GitHub (github.com/pallets-eco)
- Flask Admin (github.com/flask-admin/flask-admin)
- Flask Security (github.com/Flask-Middleware/flask-security) (Note: Actual repos may vary; this is just an example from the conversation.)
- Links and Tools:
- Stepping into Quart for Async Quart is an async variant of Flask built on ASGI rather than WSGI. David highlights the plan to bring it closer under the main Flask umbrella, allowing developers to choose synchronous or asynchronous operations while preserving familiar patterns.
- Trusted Publishing on PyPI The team migrated Flask and other Pallets libraries to “trusted publisher” workflows, meaning GitHub Actions directly publish packages to PyPI. This eliminates manual steps (and risk) around credential storage. It’s easier, more secure, and fosters quicker patch releases.
- Simplifying Dependency Management David discussed how pinning dependencies is critical for production stability. Tools like pip-tools and PDM let you compile and lock requirements. Flask now employs requirements folders and compiled “requirements.txt” to ensure consistent environments for contributors.
- Links and Tools:
- Improving Project Consistency Across Pallets Every Pallets project (Flask, Jinja, Click, Werkzeug, etc.) now follows a uniform directory structure and release process. This consistency benefits new contributors: once you understand one Pallets repo, you can easily move across them.
- Remaining Opportunities: Jinja and Click Maintenance While Flask and Werkzeug have largely reached inbox zero, Jinja and Click still have substantial backlogs. These libraries power templating and CLI creation for countless apps. David hopes more community contributors will help triage issues and drive new releases.
- Challenges of Large-Scale Open Source Projects David highlighted the emotional toll and responsibility of maintaining a project with tens of millions of monthly downloads. Best practices (like documented release processes and uniform tooling) help reduce burnout and make the team more resilient.
- Links and Tools:
- Discord Server (discord.gg/pallets) for Pallets community
- Pallets Projects (palletsprojects.com)
- Links and Tools:
Interesting quotes and stories
- “I’ve had a weird thought that anything I do might have a real impact on the tech sector that day. That’s scary.”—David Lord on the pressure of maintaining Flask.
- “When you’re the main person reviewing all the PRs and responding to all the issues, you can burn out multiple times a year.”—David discussing open-source burnout and the need for more contributors.
Key definitions and terms
- WSGI (Web Server Gateway Interface): A standard for Python web servers to forward requests to web applications or frameworks.
- ASGI (Asynchronous Server Gateway Interface): A newer standard allowing asynchronous capabilities for Python web apps, powering frameworks like Quart.
- Pallets Eco: A group effort from the Pallets team to centralize maintenance for vital Flask extensions under a common GitHub organization.
- Trusted Publisher: A method for securely automating PyPI releases without storing credentials locally.
Learning resources
Here are some courses from Talk Python Training that align well with this episode’s content. All links include the query parameter utm_source=talkpythondeepdive
for deeper learning and context.
- Building Data-Driven Web Apps with Flask and SQLAlchemy: Covers Flask fundamentals, database integration, and more.
- HTMX + Flask: Modern Python Web Apps, Hold the JavaScript: Explore adding interactivity to Flask with minimal JavaScript.
- Rock Solid Python with Python Typing: Helps you add robust type hints to Python code, something Pallets libraries continue to refine.
- Managing Python Dependencies: Dive deeper into pip, virtual environments, and best practices for locking requirements.
Overall Takeaway
The Flask and Pallets ecosystem in 2024 is leaner, faster, and more community-driven than ever. By streamlining workflows, embracing trusted publishing, and launching Pallets Eco, Flask and its libraries are poised for continued success—provided more contributors step up to keep this vital cornerstone of Python’s web ecosystem thriving.
Links from the show
David on X: @davidism
State of Pallets 2024 FlaskCon Talk: youtube.com
FlaskCon: flaskcon.com
FlaskCon 2024 Talks: youtube.com
Pallets Discord: discord.com
Pallets Eco: github.com
JazzBand: jazzband.co
Pallets Github Org: github.com
Jinja: github.com
Click: github.com
Werkzeug: github.com
MarkupSafe: github.com
ItsDangerous: github.com
Quart: github.com
pypistats: pypistats.org
Watch this episode on YouTube: youtube.com
Episode transcripts: talkpython.fm
--- Stay in touch with us ---
Subscribe to Talk Python on YouTube: youtube.com
Talk Python on Bluesky: @talkpython.fm at bsky.app
Talk Python on Mastodon: talkpython
Michael on Bluesky: @mkennedy.codes at bsky.app
Michael on Mastodon: mkennedy