Package pairtree :: Module pairtree_store :: Class PairtreeStorageFactory
[hide private]
[frames] | no frames]

Class PairtreeStorageFactory

source code


Instance Methods [hide private]
 
get_store(self, store_dir='data', uri_base=None, shorty_length=2, hashing_type=None)
Get a store - if the store does not exist, one will be instanciated
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get_store(self, store_dir='data', uri_base=None, shorty_length=2, hashing_type=None)

source code 

Get a store - if the store does not exist, one will be instanciated

If hashing_type is set to one of the hashing algorithms supported by hashlib - ['md5', 'sha1', 'sha224','sha256','sha384','sha512'] then all bytestreams will be checksummed when added or updated and their sums returned.

Parameters:
  • store_dir (A path to a directory, relative or absolute) - The file directory where the pairtree store is
  • uri_base (A URI fragment, like "http://example.org/") - The URI base for the store
  • shorty_length (integer) - The size of the shorties in the pairtree implementation (Default: 2)
  • hashing_type (Any supported by hashlib) - The name of the algorithm to use when hashing files, if left as None, this is disabled.
Returns:
PairtreeStorageClient