<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/core/download/resource.py#L278-L315) |

Represents a resource to download, extract, or both.

    tfds.download.Resource(
        *,
        url: (str | None) = None,
        extract_method: (https://www.tensorflow.org/datasets/api_docs/python/tfds/download/ExtractMethod | None) = None,
        path: (epath.PathLike | None) = None,
        relative_download_dir: https://www.tensorflow.org/datasets/api_docs/python/tfds/typing/PathLike = ''
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `url` | The URL at which to download the resource. |
| `extract_method` | `ExtractMethod` to be used to extract resource. If not set, will be guessed from downloaded file name `original_fname`. |
| `path` | Path of resource on local disk. Can be None if resource has not be downloaded yet. In such case, `url` must be set. |
| `relative_download_dir` | Optional directory for downloading relative to `download_dir`. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `extract_method` | Returns `ExtractMethod` to use on resource. |
| `url` | Returns the URL at which to download the resource. |

<br />