pip optional dependencies

Sometimes you want to make your python package usable for different situations, e.g. flask or bottle or django. If You want to minimize dependencies You can use an optional dependency in setup.py: extras_require={ ‘flask’: [‘Flask>=0.8’, ‘blinker>=1.1’] } Now you can install the library with: pip install raven[flask]  

Bringing AJAX to Flask

Flask is a micro web framework which is really fun to use. With the following snippet You have a complete web app working within seconds. from flask import Flask # 1 app = Flask(__name__) # 2 @app.route(‘/’) # 3 def hello_world(): return ‘Hello World!’ if __name__ == ‘__main__’: app.run() #4 All this snippet does is…