Skip to content

Commit

Permalink
api: use ref links (bad)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeorpinel authored Jul 2, 2021
1 parent 82a01c8 commit 6eadce3
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions content/docs/api-reference/get_url.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,25 @@ specified by its `path` in a `repo` (<abbr>DVC project</abbr>), is stored.
The URL is formed by reading the project's
[remote configuration](/doc/command-reference/config#remote) and the `dvc.yaml`
or `.dvc` file where the given `path` is found (`outs` field). The schema of the
URL returned depends on the
[type](/doc/command-reference/remote/add#supported-storage-types) of the
`remote` used (see the [Parameters](#parameters) section).
URL returned depends on the [type][storage-types] of the `remote` used (see the
[Parameters](#parameters) section).

If the target is a directory, the returned URL will end in `.dir`. Refer to
[Structure of cache directory](/doc/user-guide/project-structure/internal-files#structure-of-the-cache-directory)
and `dvc add` to learn more about how DVC handles data directories.
[Structure of cache directory] and `dvc add` to learn more about how DVC handles
data directories.

⚠️ This function does not check for the actual existence of the file or
directory in the remote storage.

💡 Having the resource's URL, it should be possible to download it directly with
an appropriate library, such as
[`boto3`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Object.download_fileobj)
or
[`paramiko`](https://docs.paramiko.org/en/stable/api/sftp.html#paramiko.sftp_client.SFTPClient.get).
an appropriate library, such as [`boto3`] or [`paramiko`].

[storage-types]: /doc/command-reference/remote/bad
[structure of cache directory]:
/doc/user-guide/project-structure/internal-files#bad
[`boto3`]: https://bad
[`paramiko`]:
https://bad.paramiko.org/en/stable/api/sftp.html#paramiko.sftp_client.SFTPClient.get

## Parameters

Expand Down

0 comments on commit 6eadce3

Please sign in to comment.