flytekit.extras.persistence.HttpPersistence

class flytekit.extras.persistence.HttpPersistence(*args, **kwargs)[source]

DataPersistence implementation for the HTTP protocol. only supports downloading from an http source. Uploads are not supported currently.

Methods

construct_path(add_protocol, add_prefix, *paths)[source]

if add_protocol is true then <protocol> is prefixed else Constructs a path in the format <base><delim>*args delim is dependent on the storage medium. each of the args is joined with the delim

Parameters
  • add_protocol (bool) –

  • add_prefix (bool) –

Return type

str

exists(path)[source]

Returns true if the given path exists, else false

Parameters

path (str) –

get(from_path, to_path, recursive=False)[source]

Retrieves data from from_path and writes to the given to_path (to_path is locally accessible)

Parameters
  • from_path (str) –

  • to_path (str) –

  • recursive (bool) –

listdir(path, recursive=False)

Returns true if the given path exists, else false

Parameters
  • path (str) –

  • recursive (bool) –

Return type

Generator[str, None, None]

put(from_path, to_path, recursive=False)[source]

Stores data from from_path and writes to the given to_path (from_path is locally accessible)

Parameters
  • from_path (str) –

  • to_path (str) –

  • recursive (bool) –

Attributes

ALLOWED_CODES = {200, 403, 404}
PROTOCOL_HTTP = 'http'
PROTOCOL_HTTPS = 'https'
default_prefix
name