patterns for flask