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!
The 10 tips
Links from the show
Sentry Error Monitoring, Code TALKPYTHON
Talk Python Training
- 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