Module Import alias Import alias TryExcept body ImportFrom alias alias handlers ExceptHandler type NameLoad body ImportFrom alias alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias ImportFrom alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias alias Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num kwarg body Expr Str TryExcept body ImportFrom alias Print Str Expr Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad NameLoad Return handlers ExceptHandler type NameLoad body Pass ImportFrom alias Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Print BinOpMod Str TupleLoad NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad Dict body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpAdd Str NameLoad Assign NameStore NameLoad For NameStore NameLoad body AugAssignAdd NameStore BinOpAdd Call NameLoad NameLoad Str If NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num AugAssignAdd NameStore BinOpAdd Str Call NameLoad NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Str Assign NameStore BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str If BoolOpAnd CompareEq NameLoad Str AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return Str If BoolOpAnd CompareNotEq NameLoad Str UnaryOpNot Call AttributeLoad NameLoad attr Str body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Dict If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr orelse If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Return Call NameLoad keyword Call NameLoad Num NameLoad keyword AttributeLoad NameLoad attr keyword Str ExceptHandler type NameLoad name NameStore body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Return NameLoad ExceptHandler type NameLoad name NameStore body Return Call NameLoad keyword Call NameLoad Num NameLoad keyword AttributeLoad NameLoad attr keyword Str ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Return Call NameLoad keyword Call NameLoad Num NameLoad keyword AttributeLoad NameLoad attr keyword Str If CompareEq Call NameLoad SubscriptLoad NameLoad Index Str NameLoad body Assign NameStore Call NameLoad keyword AttributeLoad SubscriptLoad NameLoad Index Str attr orelse Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index Str If CompareEq Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Str If Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword Num keyword NameLoad keyword SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Str body Assign NameStore BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore BoolOpOr BoolOpAnd NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Return BoolOpOr BoolOpAnd NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num NameLoad If CompareEq NameLoad Str body Return Call AttributeLoad NameLoad attr If CompareEq NameLoad Str body Return AttributeLoad AttributeLoad NameLoad attr attr If CompareEq NameLoad Str body Return Call NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Raise Call NameLoad Str decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str ClassDef bases NameLoad body Assign NameStore Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr decorator_list Return Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler body Raise Return Call NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam defaults body TryExcept body Return Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad keyword Num keyword Call NameLoad Num NameLoad keyword Call AttributeLoad NameLoad attr keyword Str Return Call NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list
N/A N/A traceback N/A base64 N/A N/A urllib.parse urlencode unquote N/A N/A N/A ImportError N/A urllib urlencode unquote N/A N/A StringIO StringIO N/A N/A N/A ImportError N/A io StringIO giotto.exceptions NoViewMethod InvalidInput NotAuthorized DataNotFound ProgramNotFound giotto.controllers GiottoController giotto.control Redirection giotto.utils render_error_page webob Request Response webob.exc HTTPUnsupportedMediaType HTTPMethodNotAllowed HTTPFound HTTPNotFound HTTPForbidden N/A http_execution_snippet import sys
mock = '--model-mock' in sys.argv
from giotto import get_config
from giotto.controllers.http import make_app, fancy_error_template_middleware, serve

application = make_app(manifest, model_mock=mock)

if not get_config('debug'):
    application = fancy_error_template_middleware(application)

if '--run' in sys.argv:
    serve('127.0.0.1', 5000, application, ssl=None, use_debugger=True, use_reloader=True)

if '--run-ssl' in sys.argv:
    serve('127.0.0.1', 443, application, ssl='adhoc', use_debugger=True, use_reloader=True)
 serve N/A N/A ip port application ssl processes N/A None 1 kwargs N/A N/A 
    Serve a wsgi app (any wsgi app) through with either werkzeug's runserver
    or the one that comes with python. Setting `processes` to anything other than 1
    will prevent the debigger from working.
     N/A N/A werkzeug.serving run_simple N/A Using Werkzeug run_simple N/A N/A run_simple ip port application ssl_context ssl processes processes kwargs N/A N/A N/A N/A ImportError N/A N/A wsgiref.simple_server make_server N/A server N/A make_server ip port application N/A N/A Serving on %s:%s, using built in Python server N/A ip port N/A N/A N/A N/A N/A server serve_forever N/A N/A N/A KeyboardInterrupt N/A N/A N/A make_url N/A N/A invocation args kwargs N/A N/A N/A N/A N/A 
    >>> make_url('some/path/program', ['arg1', 'arg2'], {'arg3': 4})
    '/some/path/program/arg1/arg2?arg3=4'
     N/A N/A N/A N/A invocation endswith / N/A N/A invocation / N/A N/A N/A N/A invocation startswith / N/A N/A invocation N/A / invocation N/A url invocation N/A arg args N/A N/A url N/A N/A str arg / N/A kwargs N/A N/A url N/A url N/A -1 N/A url N/A ? N/A urlencode kwargs N/A url N/A HTTPController N/A GiottoController N/A N/A name http N/A default_mimetype text/html mimetype_override N/A N/A self N/A N/A N/A accept N/A N/A N/A N/A self request headers get Accept N/A has_json_in_view N/A N/A N/A self program view N/A N/A N/A N/A self program view can_render json N/A N/A N/A accept */* N/A N/A self request is_xhr has_json_in_view N/A N/A application/json N/A N/A N/A accept */* N/A N/A N/A accept startswith text/html N/A N/A accept N/A None N/A get_invocation N/A N/A self N/A N/A N/A N/A N/A self request path N/A get_controller_name N/A N/A self N/A N/A N/A N/A http-%s N/A N/A N/A N/A self request method lower N/A get_raw_data N/A N/A self N/A N/A N/A data N/A N/A N/A N/A N/A self request method GET N/A N/A data N/A N/A self request GET N/A N/A N/A N/A N/A self request method POST N/A N/A data N/A N/A self request POST N/A data N/A get_concrete_response N/A N/A self N/A N/A N/A N/A N/A result N/A N/A self get_data_response N/A N/A N/A NoViewMethod N/A exc N/A N/A N/A HTTPUnsupportedMediaType body N/A render_error_page 415 exc mimetype N/A self mimetype content_type text/html N/A N/A InvalidInput N/A exc N/A N/A request N/A make_duplicate_request N/A self request N/A N/A request method GET N/A c N/A HTTPController request N/A self manifest N/A self model_mock errors exc N/A response N/A N/A c get_response N/A N/A response status_int 400 N/A response N/A N/A NotAuthorized N/A exc N/A N/A N/A HTTPForbidden body N/A render_error_page 403 exc mimetype N/A self mimetype content_type text/html N/A N/A N/A DataNotFound ProgramNotFound N/A exc N/A N/A N/A HTTPNotFound body N/A render_error_page 404 exc mimetype N/A self mimetype content_type text/html N/A N/A N/A type N/A result N/A body Redirection N/A N/A response N/A HTTPFound location N/A N/A result N/A body path N/A N/A lazy None N/A body N/A result N/A body N/A N/A N/A type body tuple N/A N/A lazy body N/A body N/A N/A hasattr body read N/A N/A body N/A N/A body read N/A response N/A Response status 200 body body content_type N/A result N/A mimetype N/A N/A response lazy_data lazy N/A response N/A persist N/A N/A self persist response N/A N/A N/A N/A key value N/A N/A persist items N/A N/A N/A N/A response set_cookie key value N/A response N/A get_primitive N/A N/A self primitive N/A N/A N/A N/A primitive USER N/A N/A auth N/A N/A N/A self request authorization N/A N/A N/A self request authorization N/A 1 N/A userpass N/A N/A auth N/A N/A base64 b64decode auth None N/A N/A N/A userpass N/A N/A N/A userpass split : N/A 0 None N/A N/A primitive ALL_DATA N/A N/A N/A N/A self get_raw_data N/A N/A primitive LOGGED_IN_USER N/A N/A N/A N/A self request user N/A N/A primitive RAW_INVOCATION_ARGS N/A N/A N/A unquote N/A N/A / join N/A self path_args N/A N/A Exception Primitive not supported N/A N/A make_duplicate_request N/A N/A request N/A N/A N/A 
    Since werkzeug request objects are immutable, this is needed to create an
    identical reuet object with immutable values so it can be retried after a
    POST failure.
     FakeRequest N/A object N/A N/A method GET N/A path N/A request path N/A headers N/A request headers N/A GET N/A request GET N/A POST N/A request POST N/A user N/A getattr request user None N/A cookies N/A request cookies N/A is_xhr N/A request is_xhr N/A N/A N/A FakeRequest N/A make_app N/A N/A manifest model_mock cache N/A False None N/A application N/A N/A environ start_response N/A N/A N/A 
        WSGI app for serving giotto applications
         N/A request N/A Request environ N/A controller N/A HTTPController request manifest model_mock model_mock N/A N/A N/A wsgi_response N/A N/A controller get_response N/A N/A N/A N/A N/A N/A wsgi_response environ start_response N/A N/A application N/A fancy_error_template_middleware N/A N/A app N/A N/A N/A 
    WGSI middleware for catching errors and rendering the error page.
     application N/A N/A environ start_response N/A N/A N/A N/A N/A N/A app environ start_response N/A N/A N/A Exception N/A exc N/A N/A sio N/A StringIO N/A N/A N/A traceback print_exc file sio N/A N/A N/A sio seek 0 N/A response N/A Response status 500 body N/A render_error_page 500 exc traceback N/A N/A sio read content_type text/html N/A N/A response environ start_response N/A N/A application N/A