huskar_api/models/infra/utils.py
def extract_application_name(url):
    """Parses the Sam URL and returns its application name.

    :param url: The URL string.
    :returns: The application name, or ``None`` if this is not a Sam URL.
    """
    try:
        args = parse_rfc1738_args(url)
    except ValueError:
        return
    scheme = args['name'] or ''
    if scheme.startswith('sam+'):
        return args['ipv4host'] or args['ipv6host']
Parses the Sam URL and returns its application name.

    :param url: The URL string.
    :returns: The application name, or ``None`` if this is not a Sam URL.
    
Parses the Sam URL and returns its application name.
Parses the Sam URL and returns its application name .
def extract_application_name(url):
    try:
        args = parse_rfc1738_args(url)
    except ValueError:
        return
    scheme = args['name'] or ''
    if scheme.startswith('sam+'):
        return args['ipv4host'] or args['ipv6host']
def extract_application_name ( url ) : try : args = parse_rfc1738_args ( url ) except ValueError : return scheme = args [ 'name' ] or '' if scheme . startswith ( 'sam+' ) : return args [ 'ipv4host' ] or args [ 'ipv6host' ]
Parses the Sam URL and returns its application name.
Parses the Sam URL and returns its application name .
"""Parses the Sam URL and returns its application name.

    :param url: The URL string.
    :returns: The application name, or ``None`` if this is not a Sam URL.
    """
The application name, or ``None`` if this is not a Sam URL.
The application name or ` ` None ` ` if this is not a Sam URL .
url
The URL string.
The URL string .