def create_Indico_request_url(<EOL>base_url,<EOL>indico_what,<EOL>indico_loc,<EOL>indico_id,<EOL>indico_type,<EOL>indico_params,<EOL>indico_key,<EOL>indico_sig,<EOL>_timestamp=None):
url = '<STR_LIT>' + indico_what + '<STR_LIT:/>'<EOL>if indico_loc:<EOL><INDENT>url += indico_loc + '<STR_LIT:/>'<EOL><DEDENT>if type(indico_id) in (list, tuple):<EOL><INDENT>indico_id = '<STR_LIT:->'.join([str(x) for x in indico_id])<EOL><DEDENT>url += indico_id + '<STR_LIT:.>' + str(indico_type)<EOL>if hasattr(indico_params, '<STR_LIT>'):<EOL><INDENT>items = indico_params.items()<EOL><DEDENT>else:<EOL><INDENT>items = list(indico_params)<EOL><DEDENT>if indico_key:<EOL><INDENT>items.append(('<STR_LIT>', indico_key))<EOL><DEDENT>if indico_sig and HASHLIB_IMPORTED:<EOL><INDENT>if _timestamp:<EOL><INDENT>items.append(('<STR_LIT>', str(_timestamp)))<EOL><DEDENT>else:<EOL><INDENT>items.append(('<STR_LIT>', str(int(time.time()))))<EOL><DEDENT>items = sorted(items, key=lambda x: x[<NUM_LIT:0>].lower())<EOL>url_to_sign = '<STR_LIT>' % (url, urlencode(items))<EOL>if sys.version_info < (<NUM_LIT:2>, <NUM_LIT:5>):<EOL><INDENT>my_digest_algo = _MySHA1(sha1())<EOL><DEDENT>else:<EOL><INDENT>my_digest_algo = sha1<EOL><DEDENT>signature = hmac.new(indico_sig, url_to_sign,<EOL>my_digest_algo).hexdigest()<EOL>items.append(('<STR_LIT>', signature))<EOL><DEDENT>elif not HASHLIB_IMPORTED:<EOL><INDENT>current_app.logger.warning(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if not items:<EOL><INDENT>return url<EOL><DEDENT>url = '<STR_LIT>' % (base_url.strip('<STR_LIT:/>'), url, urlencode(items))<EOL>return url<EOL>
Create a signed Indico request URL to access Indico HTTP Export APIs.

See U{http://indico.cern.ch/ihelp/html/ExportAPI/index.html} for more
information.

Example:
>> create_Indico_request_url("https://indico.cern.ch",
                             "categ",
                             "",
                             [1, 7],
                             "xml",
                             {'onlypublic': 'yes',
                              'order': 'title',
                              'from': 'today',
                              'to': 'tomorrow'},
                             '00000000-0000-0000-0000-000000000000',
                             '00000000-0000-0000-0000-000000000000')

@param base_url: Service base URL of the Indico instance to query
@param indico_what: element to export
@type indico_what: one of the strings: C{categ}, C{event}, C{room}, C{reservation}
@param indico_loc: location of the element(s) specified by ID (only used for some elements)
@param indico_id: ID of the element to be exported
@type indico_id: a string or a list/tuple of strings
@param indico_type: output format
@type indico_type: one of the strings: C{json}, C{jsonp}, C{xml}, C{html}, C{ics}, C{atom}
@param indico_params: parameters of the query. See U{http://indico.cern.ch/ihelp/html/ExportAPI/common.html}
@param indico_key: API key provided for the given Indico instance
@param indico_sig: API secret key (signature) provided for the given Indico instance
@param _timestamp: for testing purpose only (default: current timestamp)

@return signed URL of the request (string)