def get_cgi_parameter_str(form: cgi.FieldStorage,
                          key: str,
                          default: str = None) -> str:
    """
    Extracts a string parameter from a CGI form.
    Note: ``key`` is CASE-SENSITIVE.
    """
    paramlist = form.getlist(key)
    if len(paramlist) == 0:
        return default
    return paramlist[0]
def get_cgi_parameter_str ( form : cgi . FieldStorage , key : str , default : str = None ) -> str : paramlist = form . getlist ( key ) if len ( paramlist ) == 0 : return default return paramlist [ 0 ]
Extracts a string parameter from a CGI form.
    Note: ``key`` is CASE-SENSITIVE.