Flask-gzip
                                
                                
                                
                                    Flask-gzip copied to clipboard
                            
                            
                            
                        Allow the app initialization to be postponed
This is a widely used pattern (even in the Flask Extension Development docs) and is useful for all kinds of tricks. My usecase is not a really good one but it would work OK:
app = Flask()
cache = Cache(app)
gzip = Gzip()
gzip.after_request = \
    cache.memoize(timeout=24 * 60 * 60, key_prefix="gzip")(gzip.after_request)
gzip.init_app(app)
Right now one would need to subclass Gzip in order to do that.