Last week GameChanger Engineer Erik Taubeneck presented at the Flask NYC meetup on how to build things quickly with Flask. The setup for the talk was:
Flask is an amazing tool for getting a Python web project up and moving fast. Join active Flask user Erik Taubeneck for a presentation of best practices, hacks, and tools for Flask app development. Topics include the app factory pattern, context processors, configuration libraries, and how to build reusable Flask extensions.
Erik went through a number of items relating to building Flask apps including:
- App factory pattern: which helps with testing
- Using Celery: which can be a bit tricky with the app factory pattern
- Context Processors: which reduces the need to push everything into your templates
- Configuration: how to use Erik’s open source project Ordbok to help configure your apps with less pain
- Custom Extensions: building your own extensions like Ordbok
Slides from the talk are available here.
Ordbok: Configuring Flask Apps
Ordbok abstracts the loading of a configuration from YAML files into a Python dictionary, and also has a specific setup for use with Flask.