def local(name, catalog=None):
    """
    Create a session spec for connecting to a store on the local server.

    :param name: Store name.
    :type name: string
    :param catalog: Catalog name (None = root catalog).
    :type catalog: string
    :return: A session spec string.
    :rtype: string
    """
    if catalog:
        return '<%s:%s>' % (catalog, name)
    else:
        return '<%s>' % name
