10 tips every Flask developer should know
Episode #264,
published Tue, May 12, 2020, recorded Fri, May 1, 2020
Are you a web developer who uses Flask? It has become the most popular Python web framework. Even if you have used it for years, I bet we cover at least one thing that will surprise you and make your Flask code better.
Join me as I speak with Miguel Grinberg about his top 10 list for tips and tricks in the Flask world. They're great!
Links from the show
Join me as I speak with Miguel Grinberg about his top 10 list for tips and tricks in the Flask world. They're great!
The 10 tips
- No need to use jsonify anymore
- Do not store sensitive information in the user session
- Using a .env file for secrets - python-dotenv
- Windows laptops and Chromebooks are both great Python/Flask development machines with their Linux emulation
- Differences between App context and Request context
- Flask outside of a web server (Celery workers, cron jobs, etc.)
- Use https://github.com/TypeError/secure.py
- Use httpie instead of curl to send requests to your app
- Flask for asyncio: Quart https://pgjones.gitlab.io/quart/
- Greenlet frameworks (gevent, eventlet) and Flask
- Blueprints
Links from the show
Miguel on Twitter: @miguelgrinberg
Miguel's blog: blog.miguelgrinberg.com
python-dotenv package: pypi.org
httpie package: httpie.org
Quart: pgjones.gitlab.io
Talk Python episode on Quart: talkpython.fm
secure.py package: github.com
Episode transcripts: talkpython.fm
--- Stay in touch with us ---
Subscribe to us on YouTube: youtube.com
Follow Talk Python on Mastodon: talkpython
Follow Michael on Mastodon: mkennedy
Miguel's blog: blog.miguelgrinberg.com
python-dotenv package: pypi.org
httpie package: httpie.org
Quart: pgjones.gitlab.io
Talk Python episode on Quart: talkpython.fm
secure.py package: github.com
Episode transcripts: talkpython.fm
--- Stay in touch with us ---
Subscribe to us on YouTube: youtube.com
Follow Talk Python on Mastodon: talkpython
Follow Michael on Mastodon: mkennedy

Miguel Grinberg
Miguel Grinberg is a Software Developer at Rackspace, where he works on cloud applications. He blogs at blog.miguelgrinberg.com about a variety of topics including web development, Python, robotics, photography and the occasional movie review. Miguel is the author of the O'Reilly book "Flask Web Developmentā. He lives in beautiful Portland, Oregon.