def primitive_type(schema):
    """ Get schema type for the primitive argument.

    Note: it does treats markers & schemas as callables!

    :param schema: Value of a primitive type
    :type schema: *
    :return: const.COMPILED_TYPE.*
    :rtype: str|None
    """
    schema_type = type(schema)

    # Literal
    if schema_type in const.literal_types:
        return const.COMPILED_TYPE.LITERAL
    # Enum
    elif Enum is not None and isinstance(schema, (EnumMeta, Enum)):
        return const.COMPILED_TYPE.ENUM
    # Type
    elif issubclass(schema_type, six.class_types):
        return const.COMPILED_TYPE.TYPE
    # Mapping
    elif isinstance(schema, collections.Mapping):
        return const.COMPILED_TYPE.MAPPING
    # Iterable
    elif isinstance(schema, collections.Iterable):
        return const.COMPILED_TYPE.ITERABLE
    # Callable
    elif callable(schema):
        return const.COMPILED_TYPE.CALLABLE
    # Not detected
    else:
        return None
Get schema type for the primitive argument.

    Note: it does treats markers & schemas as callables!

    :param schema: Value of a primitive type
    :type schema: *
    :return: const.COMPILED_TYPE.*
    :rtype: str|None