Metadata-Version: 1.1
Name: flask-tryton
Version: 0.2
Summary: Adds Tryton support to Flask application
Home-page: http://code.google.com/p/flask-tryton/
Author: B2CK
Author-email: info@b2ck.com
License: GPL-3
Description: Flask-Tryton
        ============
        
        Adds Tryton support to Flask application.
        
        By default transactions are readonly except for PUT, POST, DELETE and PATCH
        request methods.
        It provides also 2 routing converters `record` and `records`.
        
        Nutshell
        --------
        
            >>> from flask import Flask
            >>> from flask_tryton import Tryton
            >>> app = Flask(__name__)
            >>> app.config['TRYTON_DATABASE'] = 'test'
            >>> tryton = Tryton(app)
            >>> User = tryton.pool.get('res.user')
            >>> @tryton.default_context
            ... def default_context():
            ...     return User.get_preferences(context_only=True)
            >>> @app.route('/')
            ... @tryton.transaction()
            ... def hello():
            ...     user, = User.search([('login', '=', 'admin')])
            ...     return '%s, Hello World!' % user.name
            >>> @app.route('/user/<record("res.user"):user>')
            ... @tryton.transaction()
            ... def user(user):
            ...     return user.name
            >>> @app.route('/users/<records("res.user"):users>')
            ... @tryton.transaction()
            ... def users(users):
            ...     return ', '.join(u.name for u in users)
            >>> app.run()
        
        For more information please visit the `flask_tryton website`_.
        
        .. _flask_tryton website: http://code.google.com/p/flask-tryton/
        
Keywords: flask tryton web
Platform: any
Classifier: Environment :: Web Environment
Classifier: Framework :: Tryton
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
