"""
Schemas for the Appsemble project.

"""
import pkg_resources

import yaml


def get(name):
    """
    Get a schema by name.

    Args:
        name (str): The name of the schema to get. This is the base name
            of the file containing the schema.

    Returns:
        dict: The schema that matches the name.

    """
    stream = pkg_resources.resource_stream(__name__, name + '.yaml')
    return yaml.load(stream)
