toil.lib.url¶
Attributes¶
Exceptions¶
Dummy class. |
Classes¶
Widget for accessing external storage (URLs). |
Functions¶
Module Contents¶
- exception toil.lib.url.ProxyConnectionError[source]¶
Bases:
BaseExceptionDummy class.
- toil.lib.url.logger¶
- class toil.lib.url.URLAccess[source]¶
Widget for accessing external storage (URLs).
- classmethod url_exists(src_uri)[source]¶
Return True if the file at the given URI exists, and False otherwise.
May raise an error if file existence cannot be determined.
- classmethod get_size(src_uri)[source]¶
Get the size in bytes of the file at the given URL, or None if it cannot be obtained.
- classmethod get_is_directory(src_uri)[source]¶
Return True if the thing at the given URL is a directory, and False if it is a file. The URL may or may not end in ‘/’.
- classmethod list_url(src_uri)[source]¶
List the directory at the given URL. Returned path components can be joined with ‘/’ onto the passed URL to form new URLs. Those that end in ‘/’ correspond to directories. The provided URL may or may not end with ‘/’.
Currently supported schemes are:
- ‘s3’ for objects in Amazon S3
e.g. s3://bucket/prefix/
- ‘file’ for local files
- classmethod read_from_url(src_uri, writable)[source]¶
Read the given URL and write its content into the given writable stream.
Raises FileNotFoundError if the URL doesn’t exist.
- classmethod open_url(src_uri)[source]¶
Read from the given URI.
Raises FileNotFoundError if the URL doesn’t exist.
Has a readable stream interface, unlike
read_from_url()which takes a writable stream.