Package zeroinstall :: Package zerostore :: Class Stores
[frames] | no frames]

Class Stores

source code

object --+
         |
        Stores

A list of Stores. All stores are searched when looking for an implementation. When storing, we use the first of the system caches (if writable), or the user's cache otherwise.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
str
lookup(self, digest) source code
str
lookup_any(self, digests)
Search for digest in all stores.
source code
str | None
lookup_maybe(self, digests)
Like lookup_any, but return None if it isn't found.
source code
 
add_dir_to_cache(self, required_digest, dir, dry_run=False)
Add to the best writable cache.
source code
 
add_archive_to_cache(self, required_digest, data, url, extract=None, type=None, start_offset=0, dry_run=False)
Add to the best writable cache.
source code
Store
get_first_system_store(self)
The first system store is the one we try writing to first.
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

lookup(self, digest)

source code 
Parameters:
  • digest (str)
Returns: str

Deprecated: use lookup_any instead

lookup_any(self, digests)

source code 

Search for digest in all stores.

Parameters:
  • digests ([str])
Returns: str
Raises:

lookup_maybe(self, digests)

source code 

Like lookup_any, but return None if it isn't found.

Parameters:
  • digests ([str])
Returns: str | None

Since: 0.53

add_dir_to_cache(self, required_digest, dir, dry_run=False)

source code 

Add to the best writable cache.

Parameters:
  • required_digest (str)
  • dry_run (bool)
  • dir (str)

add_archive_to_cache(self, required_digest, data, url, extract=None, type=None, start_offset=0, dry_run=False)

source code 

Add to the best writable cache.

Parameters:
  • dry_run (bool)
  • url (str)
  • required_digest (str)
  • start_offset (int)
  • data (file)
  • type (str | None)
  • extract (str | None)

get_first_system_store(self)

source code 

The first system store is the one we try writing to first.

Returns: Store

Since: 0.30