<s> from lib . decorator import get , post , put , delete , route , login_required <EOL> from bottle import request <EOL> def _format ( path ) : <EOL> return { <EOL> '<STR_LIT>' : request . method , <EOL> '<STR_LIT:path>' : path , <EOL> '<STR_LIT>' : request . params . get ( '<STR_LIT>' ) <EOL> } <EOL> @ get ( '<STR_LIT>' , apply = '<STR_LIT>' ) <EOL> def login ( ) : <EOL> return { '<STR_LIT>' : '<STR_LIT:success>' } <EOL> @ get ( '<STR_LIT>' ) <EOL> @ login_required ( login_url = '<STR_LIT>' ) <EOL> def authenticated ( ) : <EOL> return '<STR_LIT>' <EOL> @ get ( '<STR_LIT>' , apply = '<STR_LIT>' ) <EOL> def get ( path ) : <EOL> return _format ( path ) <EOL> @ post ( '<STR_LIT>' , apply = '<STR_LIT>' ) <EOL> def post ( path ) : <EOL> return _format ( path ) <EOL> @ put ( '<STR_LIT>' , apply = '<STR_LIT>' ) <EOL> def put ( path ) : <EOL> return _format ( path ) <EOL> @ delete ( '<STR_LIT>' , apply = '<STR_LIT>' ) <EOL> def delete ( path ) : <EOL> return _format ( path ) <EOL> @ route ( '<STR_LIT>' , apply = [ '<STR_LIT>' ] ) <EOL> def apply_list ( ) : <EOL> return { '<STR_LIT>' : '<STR_LIT:list>' } </s>
