Metadata-Version: 1.1
Name: Flask-request-params
Version: 0.2.1
Summary: Rails like interface for HTTP Request parameter of Flask.
Home-page: https://github.com/bluele/flask-request-params
Author: bluele
Author-email: jksmphone@gmail.com
License: MIT
Description: =====================
        Flask-request-params
        =====================
        
        .. image:: https://travis-ci.org/bluele/Flask-request-params.svg?branch=master
            :target: https://travis-ci.org/bluele/Flask-request-params
        
        
        Flask-request-params provides Rails-like interface to HTTP Request Parameters for Flask.
        
        
        Installation
        ------------
        To install Flask-request-params, simply::
        
            pip install flask-request-params
        
        
        Or alternatively, you can download the repository and install manually by doing::
        
            git clone git@github.com:bluele/flask-request-params.git
            cd flask-request-params
            python setup.py install
        
        
        
        Examples
        --------
        
        **Flask code**
        
        ::
        
            from flask import Flask, request, render_template, jsonify
            from flask_request_params import bind_request_params
        
        
            app = Flask(__name__)
            app.secret_key = 'secret'
            # bind rails like params to request.params
            app.before_request(bind_request_params)
        
            # just return request.params
            @app.route('/echo/<path>', methods=['GET', 'POST'])
            def echo(path):
                return jsonify(request.params)
        
            app.run(debug=True)
        
        
        **Command Line**
        
        ::
        
            # support hash type
            $ curl -X POST http://localhost:5000/echo/user -d 'user[name]=john&user[password]=pass'
            {
              "path": "user",
              "user": {
                "name": "john",
                "password": "pass"
              }
            }
        
            # support array type
            $ curl -X POST http://localhost:5000/echo/lang -d 'languages[]=python&languages[]=golang'
            {
              "path": "lang",
              "languages": [
                "python",
                "golang"
              ]
            }
        
Keywords: flask
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Flask
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
