@endpoint(u'/interface-data/tag-browser')
def tag_browser(ctx, rd):
 (db, library_id) = get_library_data(ctx, rd)[:2]
 etag = (u'%s||%s||%s' % (db.last_modified(), rd.username, library_id))
 etag = hashlib.sha1(etag.encode(u'utf-8')).hexdigest()
 def generate():
  (db, library_id) = get_library_data(ctx, rd)[:2]
  return json(ctx, rd, tag_browser, categories_as_json(ctx, rd, db))
 return rd.etagged_dynamic_response(etag, generate)

@ endpoint ( u'/interface-data/tag-browser' ) def tag_browser ( ctx , rd ) : ( db , library_id ) = get_library_data ( ctx , rd ) [ : 2 ] etag = ( u'%s||%s||%s' % ( db . last_modified ( ) , rd . username , library_id ) ) etag = hashlib . sha1 ( etag . encode ( u'utf-8' ) ) . hexdigest ( ) def generate ( ) : ( db , library_id ) = get_library_data ( ctx , rd ) [ : 2 ] return json ( ctx , rd , tag_browser , categories_as_json ( ctx , rd , db ) ) return rd . etagged_dynamic_response ( etag , generate )
get the tag browser serialized as json optional: ?library_id=<default library>&sort_tags_by=name&partition_method=first letter &collapse_at=25&dont_collapse=&hide_empty_categories= .