Class based tool that behaves like blueprints
Class Bundle is similar to flasks Blueprint with one important difference - Bundle is a class, when blueprints are instances.
Thats all. Small example how it works:
from flask.ext.bundle import Bundle, expose class News(Bundle): @expose('/', methods=['GET', 'POST']) def index(self): return 'Ok'
Based on bundle we have some helpers to build APIs in flask.ext.bundle.api.
Decorator for views, get Trafaret instance. Will return errors dict and status 400 on error.
Decorator for result encoding, gets list of encoders. Each encoder must implement two methods, mimes that returns MIME codes, and encode(self, data, mime=None) that encode data to response string.
Extensions to Bundle to make API explorable (TODO write more)
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size Flask-Bundle-0.4.tar.gz (4.0 kB)||File type Source||Python version None||Upload date||Hashes View hashes|