snakemake.remote package

Submodules

snakemake.remote.EGA module

class snakemake.remote.EGA.EGAFile(dataset, path)

Bases: tuple

dataset

Alias for field number 0

path

Alias for field number 1

class snakemake.remote.EGA.EGAFileInfo(size, status, id, checksum)

Bases: tuple

checksum

Alias for field number 3

id

Alias for field number 2

size

Alias for field number 0

status

Alias for field number 1

class snakemake.remote.EGA.RemoteObject(*args, protocol=None, keep_local=False, stay_on_remote=False, provider=None, **kwargs)[source]

Bases: snakemake.remote.AbstractRemoteObject

download()[source]
exists()[source]
mtime()[source]
parts
size()[source]
class snakemake.remote.EGA.RemoteProvider(*args, keep_local=False, stay_on_remote=False, is_default=False, retry=5, **kwargs)[source]

Bases: snakemake.remote.AbstractRemoteProvider

api_request(url_suffix, url_prefix='https://ega.ebi.ac.uk:8051/elixir/', json=True, post=False, **params)[source]

Make an API request.

Parameters:
available_protocols

List of valid protocols for this remote provider.

default_protocol

The protocol that is prepended to the path when no protocol is specified.

get_files(dataset)[source]
token

snakemake.remote.FTP module

snakemake.remote.GS module

snakemake.remote.HTTP module

class snakemake.remote.HTTP.RemoteObject(*args, keep_local=False, provider=None, additional_request_string='', allow_redirects=True, **kwargs)[source]

Bases: snakemake.remote.DomainObject

This is a class to interact with an HTTP server.

download(make_dest_dirs=True)[source]
exists()[source]
get_header_item(httpr, header_name, default)[source]

Since HTTP header capitalization may differ, this returns a header value regardless of case

httpr(verb='GET', stream=False)[source]
list
mtime()[source]
size()[source]
upload()[source]
class snakemake.remote.HTTP.RemoteProvider(*args, keep_local=False, stay_on_remote=False, is_default=False, **kwargs)[source]

Bases: snakemake.remote.AbstractRemoteProvider

available_protocols

List of valid protocols for this remote provider.

default_protocol

The protocol that is prepended to the path when no protocol is specified.

remote(value, *args, insecure=None, **kwargs)[source]

snakemake.remote.NCBI module

snakemake.remote.S3 module

snakemake.remote.S3Mocked module

snakemake.remote.SFTP module

snakemake.remote.XRootD module

snakemake.remote.dropbox module

snakemake.remote.gfal module

snakemake.remote.gridftp module

snakemake.remote.iRODS module

snakemake.remote.webdav module

Module contents

class snakemake.remote.AbstractRemoteObject(*args, protocol=None, keep_local=False, stay_on_remote=False, provider=None, **kwargs)[source]

Bases: object

This is an abstract class to be used to derive remote object classes for different cloud storage providers. For example, there could be classes for interacting with Amazon AWS S3 and Google Cloud Storage, both derived from this common base class.

close()[source]
download(*args, **kwargs)[source]
exists()[source]
file()[source]
list(*args, **kwargs)[source]
local_file()[source]
local_touch_or_create()[source]
mtime()[source]
name(*args, **kwargs)[source]
remote(value, keep_local=False, stay_on_remote=False)[source]
remote_file()[source]
remove()[source]
size()[source]
upload(*args, **kwargs)[source]
class snakemake.remote.AbstractRemoteProvider(*args, keep_local=False, stay_on_remote=False, is_default=False, **kwargs)[source]

Bases: object

This is an abstract class to be used to derive remote provider classes. These might be used to hold common credentials, and are then passed to RemoteObjects.

allows_directories = False
available_protocols()[source]

List of valid protocols for this remote provider.

default_protocol()[source]

The protocol that is prepended to the path when no protocol is specified.

glob_wildcards(pattern, *args, **kwargs)[source]
remote(value, *args, keep_local=None, stay_on_remote=None, static=False, **kwargs)[source]
remote_interface()[source]
supports_default = False
class snakemake.remote.DomainObject(*args, **kwargs)[source]

Bases: snakemake.remote.AbstractRemoteObject

This is a mixin related to parsing components out of a location path specified as (host|IP):port/remote/location

host
local_path
name
path_prefix
path_remainder
port
remote_path
class snakemake.remote.StaticRemoteObjectProxy[source]

Bases: ObjectProxy

Proxy that implements static-ness for remote objects.

The constructor takes a real RemoteObject and returns a proxy that behaves the same except for the exists() and mtime() methods.

exists()[source]
is_newer(time)[source]
mtime()[source]