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

Package zerostore

source code

Code for managing the implementation cache.

Submodules

Classes
  BadDigest
Thrown if a digest is invalid (either syntactically or cryptographically).
  NotStored
Throws if a requested implementation isn't in the cache.
  NonwritableStore
Attempt to add to a non-writable store directory.
  Store
A directory for storing implementations.
  Stores
A list of Stores.
Functions
(str, str)
parse_algorithm_digest_pair(src)
Break apart an algorithm/digest into in a tuple.
source code
str
format_algorithm_digest_pair(alg, digest)
The opposite of parse_algorithm_digest_pair.
source code
Function Details

parse_algorithm_digest_pair(src)

source code 

Break apart an algorithm/digest into in a tuple. Old algorithms use '=' as the separator, while newer ones use '_'.

Parameters:
  • src (str) - the combined string
Returns: (str, str)
the parsed values
Raises:

Since: 1.10

format_algorithm_digest_pair(alg, digest)

source code 

The opposite of parse_algorithm_digest_pair. The result is suitable for use as a directory name (does not contain '/' characters).

Parameters:
  • alg (str)
  • digest (str)
Returns: str
Raises:

Since: 1.10