Module Expr Str ImportFrom alias alias Import alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Import alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num NameLoad ImportFrom alias Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore Call AttributeLoad NameLoad attr Str attr AttributeLoad NameLoad attr Expr Call NameLoad NameLoad keyword Str keyword Str FunctionDef arguments args defaults body Expr Str Return Str decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args defaults body Expr Str Return Call NameLoad keyword Str decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args defaults body Expr Str Return Call NameLoad keyword NameLoad decorator_list Call AttributeLoad NameLoad attr Str keyword ListLoad Str If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr keyword NameLoad
N/A N/A 
Flask-Cors example
===================
This is a tiny Flask Application demonstrating Flask-Cors, making it simple
to add cross origin support to your flask app!

:copyright: (C) 2013 by Cory Dolphin.
:license:   MIT/X11, see LICENSE for more details.
 flask Flask jsonify N/A logging N/A N/A flask.ext.cors CORS N/A N/A N/A ImportError N/A N/A os N/A parentdir N/A N/A N/A os path dirname N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ N/A N/A N/A N/A N/A os sys path insert 0 parentdir flask.ext.cors CORS N/A app N/A Flask FlaskCorsAppBasedExample N/A N/A N/A logging basicConfig level N/A logging INFO N/A N/A N/A N/A logging getLogger flask_cors level N/A logging DEBUG N/A N/A CORS app resources /api/* allow_headers Content-Type helloWorld N/A N/A N/A N/A N/A 
        Since the path '/' does not match the regular expression r'/api/*',
        this route does not have CORS headers set.
     N/A <h1>Hello CORS!</h1> Read about my spec at the
<a href="http://www.w3.org/TR/cors/">W3</a> Or, checkout my documentation
on <a href="https://github.com/corydolphin/flask-cors">Github</a> N/A N/A N/A app route / list_users N/A N/A N/A N/A N/A 
        Since the path matches the regular expression r'/api/*', this resource
        automatically has CORS headers set. The expected result is as follows:

        $ curl --include -X GET http://127.0.0.1:5000/api/v1/users/             --header Origin:www.examplesite.com
        HTTP/1.0 200 OK
        Access-Control-Allow-Headers: Content-Type
        Access-Control-Allow-Origin: *
        Content-Length: 21
        Content-Type: application/json
        Date: Sat, 09 Aug 2014 00:26:41 GMT
        Server: Werkzeug/0.9.4 Python/2.7.8

        {
            "success": true
        }

     N/A N/A jsonify user joe N/A N/A N/A app route /api/v1/users/ create_user N/A N/A N/A N/A N/A 
        Since the path matches the regular expression r'/api/*', this resource
        automatically has CORS headers set.

        Browsers will first make a preflight request to verify that the resource
        allows cross-origin POSTs with a JSON Content-Type, which can be simulated
        as:
        $ curl --include -X OPTIONS http://127.0.0.1:5000/api/v1/users/create             --header Access-Control-Request-Method:POST             --header Access-Control-Request-Headers:Content-Type             --header Origin:www.examplesite.com
        >> HTTP/1.0 200 OK
        Content-Type: text/html; charset=utf-8
        Allow: POST, OPTIONS
        Access-Control-Allow-Origin: *
        Access-Control-Allow-Headers: Content-Type
        Access-Control-Allow-Methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT
        Content-Length: 0
        Server: Werkzeug/0.9.6 Python/2.7.9
        Date: Sat, 31 Jan 2015 22:25:22 GMT


        $ curl --include -X POST http://127.0.0.1:5000/api/v1/users/create             --header Content-Type:application/json             --header Origin:www.examplesite.com


        >> HTTP/1.0 200 OK
        Content-Type: application/json
        Content-Length: 21
        Access-Control-Allow-Origin: *
        Server: Werkzeug/0.9.6 Python/2.7.9
        Date: Sat, 31 Jan 2015 22:25:04 GMT

        {
          "success": true
        }

     N/A N/A jsonify success True N/A N/A N/A app route /api/v1/users/create methods N/A POST N/A N/A __name__ __main__ N/A N/A N/A N/A app run debug True