python_modules/dagster/dagster/core/definitions/resource.py
def resource(config_field=None, description=None):
    '''A decorator for creating a resource. The decorated function will be used as the 
    resource_fn in a ResourceDefinition.
    '''

    # This case is for when decorator is used bare, without arguments.
    # E.g. @resource versus @resource()
    if callable(config_field):
        return ResourceDefinition(resource_fn=config_field)

    def _wrap(resource_fn):
        return ResourceDefinition(resource_fn, config_field, description)

    return _wrap
def resource(config_field=None, description=None):
    '''A decorator for creating a resource. The decorated function will be used as the 
    resource_fn in a ResourceDefinition.
    '''

    # This case is for when decorator is used bare, without arguments.
    # E.g. @resource versus @resource()
    if callable(config_field):
        return ResourceDefinition(resource_fn=config_field)

    def _wrap(resource_fn):
        return ResourceDefinition(resource_fn, config_field, description)

    return _wrap
def resource ( config_field = None , description = None ) : # This case is for when decorator is used bare, without arguments. # E.g. @resource versus @resource() if callable ( config_field ) : return ResourceDefinition ( resource_fn = config_field ) def _wrap ( resource_fn ) : return ResourceDefinition ( resource_fn , config_field , description ) return _wrap
A decorator for creating a resource. The decorated function will be used as the 
    resource_fn in a ResourceDefinition.
A decorator for creating a resource . The decorated function will be used as the resource_fn in a ResourceDefinition .