#NEWLINE# @ get ( '/s/sets/{set_id}' ) #NEWLINE# def get_set_route( request , set_id ) : #NEWLINE# #INDENT# '\n    Get a specific set given an ID.\n    ' #NEWLINE# db_conn = request [ 'db_conn' ] #NEWLINE# set_ = Set . get_latest_accepted ( db_conn , set_id ) #NEWLINE# if ( not set_ ) : #NEWLINE# #INDENT# return abort ( 404 ) #NEWLINE# #UNINDENT# topics = Topic . list_by_entity_id ( db_conn , entity_id = set_id ) #NEWLINE# versions = Set . get_versions ( db_conn , entity_id = set_id ) #NEWLINE# units = set_ . list_units ( db_conn ) #NEWLINE# return ( 200 , { #NEWLINE# #INDENT# 'set' : set_ . deliver ( ) , #NEWLINE# 'topics' : [ topic . deliver ( ) for topic in topics ] , #NEWLINE# 'versions' : [ version . deliver ( ) for version in versions ] , #NEWLINE# 'units' : [ unit . deliver ( ) for unit in units ] , #NEWLINE# #UNINDENT# } )