python_modules/dagster/dagster/core/types/field.py
def Field(
    dagster_type,
    default_value=FIELD_NO_DEFAULT_PROVIDED,
    is_optional=INFER_OPTIONAL_COMPOSITE_FIELD,
    is_secret=False,
    description=None,
):
    '''
    The schema for configuration data that describes the type, optionality, defaults, and description.

    Args:
        dagster_type (DagsterType):
            A ``DagsterType`` describing the schema of this field, ie `Dict({'example': Field(String)})`
        default_value (Any):
            A default value to use that respects the schema provided via dagster_type
        is_optional (bool): Whether the presence of this field is optional
        despcription (str):
    '''
    config_type = resolve_to_config_type(dagster_type)
    if not config_type:
        raise DagsterInvalidDefinitionError(
            (
                'Attempted to pass {value_repr} to a Field that expects a valid '
                'dagster type usable in config (e.g. Dict, NamedDict, Int, String et al).'
            ).format(value_repr=repr(dagster_type))
        )
    return FieldImpl(
        config_type=resolve_to_config_type(dagster_type),
        default_value=default_value,
        is_optional=is_optional,
        is_secret=is_secret,
        description=description,
    )
def Field(
    dagster_type,
    default_value=FIELD_NO_DEFAULT_PROVIDED,
    is_optional=INFER_OPTIONAL_COMPOSITE_FIELD,
    is_secret=False,
    description=None,
):
    '''
    The schema for configuration data that describes the type, optionality, defaults, and description.

    Args:
        dagster_type (DagsterType):
            A ``DagsterType`` describing the schema of this field, ie `Dict({'example': Field(String)})`
        default_value (Any):
            A default value to use that respects the schema provided via dagster_type
        is_optional (bool): Whether the presence of this field is optional
        despcription (str):
    '''
    config_type = resolve_to_config_type(dagster_type)
    if not config_type:
        raise DagsterInvalidDefinitionError(
            (
                'Attempted to pass {value_repr} to a Field that expects a valid '
                'dagster type usable in config (e.g. Dict, NamedDict, Int, String et al).'
            ).format(value_repr=repr(dagster_type))
        )
    return FieldImpl(
        config_type=resolve_to_config_type(dagster_type),
        default_value=default_value,
        is_optional=is_optional,
        is_secret=is_secret,
        description=description,
    )
The schema for configuration data that describes the type, optionality, defaults, and description.

    Args:
        dagster_type (DagsterType):
            A ``DagsterType`` describing the schema of this field, ie `Dict({'example': Field(String)})`
        default_value (Any):
            A default value to use that respects the schema provided via dagster_type
        is_optional (bool): Whether the presence of this field is optional
        despcription (str):