<s> """<STR_LIT>""" <EOL> from flask import Flask , request <EOL> from flask . ext . moresql import MoreSQL <EOL> app = Flask ( __name__ ) <EOL> app . config [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> db = MoreSQL ( app ) <EOL> @ app . route ( '<STR_LIT>' , methods = [ '<STR_LIT:GET>' ] ) <EOL> def dogs ( ) : <EOL> return db . execute ( '<STR_LIT>' ) <EOL> @ app . route ( '<STR_LIT>' , methods = [ '<STR_LIT:GET>' , '<STR_LIT:POST>' , ] ) <EOL> def dog ( dog_id ) : <EOL> if request . method == '<STR_LIT:POST>' : <EOL> return db . execute ( '<STR_LIT>' , fields = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' ] ) <EOL> return db . execute ( <EOL> '<STR_LIT>' , fields = [ '<STR_LIT>' ] , values = { '<STR_LIT>' : dog_id } ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> app . run ( debug = True ) </s>
