Package zeroinstall :: Package injector :: Module fetch :: Class Fetcher
[frames] | no frames]

Class Fetcher

source code

object --+
         |
        Fetcher

Downloads and stores various things.

Instance Methods
 
__init__(self, handler)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
cook(self, required_digest, recipe, stores, force=False, impl_hint=None)
Follow a Recipe.
source code
 
get_feed_mirror(self, url)
Return the URL of a mirror for this feed.
source code
 
download_and_import_feed(self, feed_url, iface_cache, force=False)
Download the feed, download any required keys, confirm trust if needed and import.
source code
tasks.Blocker
download_impl(self, impl, retrieval_method, stores, force=False)
Download an implementation.
source code
 
download_archive(self, download_source, force=False, impl_hint=None)
Fetch an archive.
source code
tasks.Task
download_icon(self, interface, force=False)
Download an icon for this interface and add it to the icon cache.
source code
 
download_impls(self, implementations, stores)
Download the given implementations, choosing a suitable retrieval method for each.
source code
model.RetrievalMethod
get_best_source(self, impl)
Return the best download source for this implementation.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables
str feed_mirror
the base URL of a mirror site for keys and feeds
handler.Handler handler
handler to use for user-interaction
Properties

Inherited from object: __class__

Method Details

__init__(self, handler)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

cook(self, required_digest, recipe, stores, force=False, impl_hint=None)

source code 

Follow a Recipe.

Parameters:
  • impl_hint - the Implementation this is for (if any) as a hint for the GUI
Decorators:
  • @tasks.async

See Also: download_impl uses this method when appropriate

download_and_import_feed(self, feed_url, iface_cache, force=False)

source code 

Download the feed, download any required keys, confirm trust if needed and import.

Parameters:
  • feed_url (str) - the feed to be downloaded
  • iface_cache (iface_cache.IfaceCache) - cache in which to store the feed
  • force - whether to abort and restart an existing download

download_impl(self, impl, retrieval_method, stores, force=False)

source code 

Download an implementation.

Parameters:
Returns: tasks.Blocker

download_archive(self, download_source, force=False, impl_hint=None)

source code 

Fetch an archive. You should normally call download_impl instead, since it handles other kinds of retrieval method too.

download_icon(self, interface, force=False)

source code 

Download an icon for this interface and add it to the icon cache. If the interface has no icon or we are offline, do nothing.

Returns: tasks.Task
the task doing the import, or None