(package: Package, name: str)
return (_common.from_package(package) / name).is_file()
True if 'name' is a resource inside 'package'.

    Directories are *not* resources.
True if 'name' is a resource inside 'package'.
True if name is a resource inside package .
def is_resource(package: Package, name: str) -> bool:
    """True if 'name' is a resource inside 'package'.

    Directories are *not* resources.
    """
    package = _common.get_package(package)
    _common.normalize_path(name)
    reader = _common.get_resource_reader(package)
    if reader is not None:
        return reader.is_resource(name)
    package_contents = set(contents(package))
    if name not in package_contents:
        return False
    return (_common.from_package(package) / name).is_file()
def is_resource ( package : Package , name : str ) -> bool : package = _common . get_package ( package ) _common . normalize_path ( name ) reader = _common . get_resource_reader ( package ) if reader is not None : return reader . is_resource ( name ) package_contents = set ( contents ( package ) ) if name not in package_contents : return False return ( _common . from_package ( package ) / name ) . is_file ( )